mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-04-26 00:02:20 +08:00
This is now possible since PR 1207 has been merged. Using an assignment in condition is a typical pattern used when walking the tokens arrays and should be ok for this library.
32 lines
1 KiB
XML
32 lines
1 KiB
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"/>
|
|
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/>
|
|
</rule>
|
|
|
|
<rule ref="WordPress-Docs"/>
|
|
|
|
<!-- Enforce PSR1 compatible namespaces. -->
|
|
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
|
|
|
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
|
|
<properties>
|
|
<property name="alignMultilineItems" value="!=100"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
</ruleset>
|