summaryrefslogtreecommitdiffstatshomepage
path: root/composer.json
diff options
context:
space:
mode:
authorGary Pendergast <pento@git.wordpress.org>2019-07-19 07:47:16 +0000
committerGary Pendergast <pento@git.wordpress.org>2019-07-19 07:47:16 +0000
commit3d1714de710be2d277b6280ca34a01c43866d3e6 (patch)
treebf74d72fdc0eb9e833124f5073e6f5f7424013d1 /composer.json
parentab26c9a2fb4b839aba2d42c7709033aa07e7546a (diff)
downloadwordpress-3d1714de710be2d277b6280ca34a01c43866d3e6.tar.gz
wordpress-3d1714de710be2d277b6280ca34a01c43866d3e6.zip
Coding Standards: Move the remaining PHPCS errors to report as warnings, and add Travis tests.
The remaining error-level coding standards issues (specifically, associated with the sniffs `WordPress.PHP.YodaConditions.NotYoda`, `WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase`, `WordPress.DB.PreparedSQL.InterpolatedNotPrepared`, `WordPress.DB.PreparedSQL.NotPrepared`, and `WordPress.Files.FileName.InvalidClassFileName`) are marked as warnings, until they're all addressed. This change allows us to run linting on Travis across the entire codebase, ensuring no other error-level violations can be introduced. Additionally, PHPCS will now cache results locally, drastically improving performance for subsequent checks: scanning the entire codebase takes 1-2 minutes the first time, and less than one second for subsequent checks. See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45665 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'composer.json')
-rw-r--r--composer.json5
1 files changed, 3 insertions, 2 deletions
diff --git a/composer.json b/composer.json
index 03f050fd4c..c795607093 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,8 @@
"wp-coding-standards/wpcs": "~2.1.0"
},
"scripts": {
- "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
- "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source"
+ "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M",
+ "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M",
+ "lint:errors": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M -n"
}
}