2014-08-17 16:40:13 +00:00
|
|
|
<?xml version="1.0"?>
|
2015-04-24 02:05:33 +00:00
|
|
|
<ruleset name="WordPress Theme Coding Standards">
|
2014-11-01 00:45:39 +00:00
|
|
|
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
2015-01-06 04:48:47 +00:00
|
|
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
2017-06-11 23:41:31 +00:00
|
|
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
|
2014-11-01 00:45:39 +00:00
|
|
|
|
2014-08-17 16:40:13 +00:00
|
|
|
<!-- Set a description for this ruleset. -->
|
2015-04-24 02:05:33 +00:00
|
|
|
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
2014-08-17 16:40:13 +00:00
|
|
|
|
2017-06-11 22:21:34 +00:00
|
|
|
<!-- Pass some flags to PHPCS:
|
|
|
|
p flag: Show progress of the run.
|
|
|
|
s flag: Show sniff codes in all reports.
|
|
|
|
v flag: Print verbose output.
|
|
|
|
n flag: Do not print warnings.
|
|
|
|
-->
|
|
|
|
<arg value="psvn"/>
|
|
|
|
|
|
|
|
<!-- Only check the PHP files. JS files are checked separately with JSCS and JSHint. -->
|
|
|
|
<arg name="extensions" value="php"/>
|
|
|
|
|
|
|
|
<!-- Check all files in this directory and the directories below it. -->
|
|
|
|
<file>.</file>
|
|
|
|
|
2014-08-17 16:40:13 +00:00
|
|
|
<!-- Include the WordPress ruleset, with exclusions. -->
|
|
|
|
<rule ref="WordPress">
|
2015-04-24 02:05:33 +00:00
|
|
|
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
2015-04-24 02:08:26 +00:00
|
|
|
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
2015-04-24 02:41:08 +00:00
|
|
|
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
2014-08-17 16:40:13 +00:00
|
|
|
</rule>
|
2015-12-15 09:09:54 +00:00
|
|
|
|
2017-06-11 23:41:31 +00:00
|
|
|
<!-- Verify that the text_domain is set to the desired text-domain.
|
|
|
|
Multiple valid text domains can be provided as a comma-delimited list. -->
|
|
|
|
<rule ref="WordPress.WP.I18n">
|
|
|
|
<properties>
|
|
|
|
<property name="text_domain" type="array" value="_s" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
2015-12-15 09:09:54 +00:00
|
|
|
<!-- Include sniffs for PHP cross-version compatibility. -->
|
2016-08-25 21:24:57 +00:00
|
|
|
<config name="testVersion" value="5.2-99.0"/>
|
2015-12-15 09:09:54 +00:00
|
|
|
<rule ref="PHPCompatibility"/>
|
|
|
|
</ruleset>
|