🔧 PHPCS: don't ignore warnings, don't list scanned files
The `-n` flag will ignore warnings completely, while often it is useful to see them and to fix them. Using `--runtime-set ignore_warnings_on_exit 1` in the Travis script instead, warnings will be shown, both when a developer runs PHPCS on their own machine, as well as in Travis, but warnings will not cause a failed Travis build. The `-v` flag will list each file being scanned. This is intended for debugging purposes and not needed for normal use.
This commit is contained in:
parent
92d8673e4a
commit
c453749f7a
2 changed files with 2 additions and 4 deletions
|
@ -84,7 +84,7 @@ script:
|
|||
# @link https://pear.php.net/package/PHP_CodeSniffer/
|
||||
# Uses a custom ruleset based on WordPress. This ruleset is automatically
|
||||
# picked up by PHPCS as it's named `phpcs.xml(.dist)`.
|
||||
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/bin/phpcs; fi
|
||||
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/bin/phpcs --runtime-set ignore_warnings_on_exit 1; fi
|
||||
|
||||
# Receive notifications for build results.
|
||||
# @link https://docs.travis-ci.com/user/notifications/#Email-notifications
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue