mirror of
https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-07-29 10:56:57 +08:00
* Run the sniffs using a higher PHP and PHPCS version. * Minor simplification in the command to call phpcs. * Show warnings, but do not break the build for it. Previously warnings wouldn't be shown at all. * Move a number of command line options to the ruleset. * Exclude the Composer `vendor` directory if it exists. * Update the section in the `Contributing.md` regarding code style
25 lines
788 B
XML
25 lines
788 B
XML
<?xml version="1.0"?>
|
|
<ruleset name="WordPress Coding Standards">
|
|
<description>The Coding standard for the WordPress Coding Standards itself.</description>
|
|
|
|
<arg value="sp"/>
|
|
<arg name="extensions" value="php"/>
|
|
|
|
<!-- Exclude the code in the PHPCS 2.x test files copied in from PHPCS. -->
|
|
<exclude-pattern>/Test/AllTests.php</exclude-pattern>
|
|
<exclude-pattern>/Test/Standards/*.php</exclude-pattern>
|
|
|
|
<!-- Exclude Composer vendor directory. -->
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
|
|
<rule ref="WordPress-Extra">
|
|
<exclude name="WordPress.Files.FileName" />
|
|
<exclude name="WordPress.NamingConventions.ValidVariableName" />
|
|
</rule>
|
|
|
|
<rule ref="WordPress-Docs" />
|
|
|
|
<!-- Enforce PSR1 compatible namespaces. -->
|
|
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
|
|
|
</ruleset>
|