mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-05-06 07:02:23 +08:00
33 lines
1.3 KiB
XML
33 lines
1.3 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="Example Project">
|
|
<description>A custom set of rules to check for a WPized WordPress project</description>
|
|
|
|
<exclude-pattern>/docroot/wp-admin/*</exclude-pattern>
|
|
<exclude-pattern>/docroot/wp-includes/*</exclude-pattern>
|
|
<exclude-pattern>/docroot/wp-*.php</exclude-pattern>
|
|
<exclude-pattern>/docroot/index.php</exclude-pattern>
|
|
<exclude-pattern>/docroot/xmlrpc.php</exclude-pattern>
|
|
<exclude-pattern>/docroot/wp-content/plugins/*</exclude-pattern>
|
|
|
|
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
|
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
|
<rule ref="Generic.Commenting.Todo"/>
|
|
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
|
|
|
<!--
|
|
We may also want to to include all the rules in a standard
|
|
-->
|
|
<rule ref="WordPress-Core">
|
|
<!--
|
|
We may want a middle ground though. The best way to do this is add the
|
|
entire ruleset, then rule by rule, remove ones that don't suit a project. We
|
|
can do this by running `phpcs` with the '-s' flag, to see the names of the
|
|
different Sniffs, as their rules are broken. From here, we can opt to
|
|
exclude problematic sniffs like so.
|
|
-->
|
|
|
|
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
|
|
<exclude name="WordPress.Functions.FunctionCallSignature" />
|
|
</rule>
|
|
</ruleset>
|