Rename the PHPCS ruleset.

If the file is called `phpcs.xml` or `phpcs.xml.dist`, it is automatically picked up by PHPCS.

A `phpcs.xml` is given preference over a `phpcs.xml.dist` file. So renaming the file to `phpcs.xml.dist` allows for people to use the file provided by `_s` if they choose not to add their own, but also leaves people the freedom to easily overrule it.
This commit is contained in:
jrfnl 2017-06-12 00:11:53 +02:00
parent 59b66c7dd5
commit 0d353e1c0c
2 changed files with 3 additions and 2 deletions

View File

@ -83,9 +83,10 @@ script:
# -s flag: Show sniff codes in all reports. # -s flag: Show sniff codes in all reports.
# -v flag: Print verbose output. # -v flag: Print verbose output.
# -n flag: Do not print warnings. (shortcut for --warning-severity=0) # -n flag: Do not print warnings. (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard. # Uses a custom ruleset based on WordPress. This ruleset is automatically
# picked up by PHPCS as it's named `phpcs.xml(.dist)`.
# --extensions: Only sniff PHP files. # --extensions: Only sniff PHP files.
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php; fi - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n . --extensions=php; fi
# Receive notifications for build results. # Receive notifications for build results.
# @link http://docs.travis-ci.com/user/notifications/#Email-notifications # @link http://docs.travis-ci.com/user/notifications/#Email-notifications