forked from mirror/_s
PHPCS: Move the recommended command line arguments into the custom ruleset.
This commit is contained in:
parent
0d353e1c0c
commit
b78d053772
|
@ -79,14 +79,9 @@ script:
|
|||
# WordPress Coding Standards.
|
||||
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
|
||||
# @link http://pear.php.net/package/PHP_CodeSniffer/
|
||||
# -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. (shortcut for --warning-severity=0)
|
||||
# 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.
|
||||
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n . --extensions=php; fi
|
||||
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs; fi
|
||||
|
||||
# Receive notifications for build results.
|
||||
# @link http://docs.travis-ci.com/user/notifications/#Email-notifications
|
||||
|
|
|
@ -6,6 +6,20 @@
|
|||
<!-- Set a description for this ruleset. -->
|
||||
<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. -->
|
||||
<rule ref="WordPress">
|
||||
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
||||
|
|
Reference in New Issue