Merge branch 'feature/rename-phpcs-ruleset'

This commit is contained in:
David A. Kennedy 2017-06-16 00:39:39 +02:00
commit 67d6d59235
2 changed files with 17 additions and 7 deletions

View File

@ -79,13 +79,9 @@ script:
# WordPress Coding Standards. # WordPress Coding Standards.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards # @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/ # @link http://pear.php.net/package/PHP_CodeSniffer/
# -p flag: Show progress of the run. # Uses a custom ruleset based on WordPress. This ruleset is automatically
# -s flag: Show sniff codes in all reports. # picked up by PHPCS as it's named `phpcs.xml(.dist)`.
# -v flag: Print verbose output. - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs; fi
# -n flag: Do not print warnings. (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --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

View File

@ -7,6 +7,20 @@
<!-- Set a description for this ruleset. --> <!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description> <description>A custom set of code standard rules to check for WordPress themes.</description>
<!-- Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
v flag: Print verbose output.
n flag: Do not print warnings.
-->
<arg value="psvn"/>
<!-- Only check the PHP files. JS files are checked separately with JSCS and JSHint. -->
<arg name="extensions" value="php"/>
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Include the WordPress ruleset, with exclusions. --> <!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress"> <rule ref="WordPress">
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" /> <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />