Skip to content

Commit

Permalink
Add new PHPCS Config.
Browse files Browse the repository at this point in the history
  • Loading branch information
kopepasah committed Oct 30, 2019
1 parent af193df commit 80306eb
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs" />
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>

<rule ref="WordPress" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>

<arg name="extensions" value="php" />
<!-- Show sniff codes in all reports -->
<arg value="ps"/>

<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
<rule ref="PHPCompatibility"/>

<!-- Minimum PHP and WP versions -->
<config name="testVersion" value="7.1-"/>
<config name="minimum_supported_wp_version" value="4.4"/>

<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>

0 comments on commit 80306eb

Please sign in to comment.