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:
parent
59b66c7dd5
commit
0d353e1c0c
2 changed files with 3 additions and 2 deletions
19
phpcs.xml.dist
Normal file
19
phpcs.xml.dist
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="WordPress Theme Coding Standards">
|
||||
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
||||
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
||||
|
||||
<!-- Set a description for this ruleset. -->
|
||||
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
||||
|
||||
<!-- Include the WordPress ruleset, with exclusions. -->
|
||||
<rule ref="WordPress">
|
||||
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
||||
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
||||
</rule>
|
||||
|
||||
<!-- Include sniffs for PHP cross-version compatibility. -->
|
||||
<config name="testVersion" value="5.2-99.0"/>
|
||||
<rule ref="PHPCompatibility"/>
|
||||
</ruleset>
|
Loading…
Add table
Add a link
Reference in a new issue