Browse Source

Cleanup code tools

develop
Chris Wiegman 2 years ago
parent
commit
32ffca7144
No known key found for this signature in database GPG Key ID: 63C83F823595106A
4 changed files with 21 additions and 35 deletions
  1. +0
    -18
      codesniffer.ruleset.xml
  2. +21
    -0
      phpcs.xml
  3. +0
    -17
      phpcs.xml.dist
  4. +0
    -0
      phpunit.xml

+ 0
- 18
codesniffer.ruleset.xml View File

@ -1,18 +0,0 @@
<?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. -->
<rule ref="PHPCompatibility"/>
</ruleset>

+ 21
- 0
phpcs.xml View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<ruleset name="WP-Enforcer">
<description>Coding standards from WP Enforcer.</description>
<!-- FILES -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*.xml</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<!-- Rules -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
</ruleset>

+ 0
- 17
phpcs.xml.dist View File

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>

phpunit.xml.dist → phpunit.xml View File