Files
yeuchaybo/phpcs.xml.dist
Thuan Bui fd25f13a4f Initial
2018-06-26 11:09:22 +07:00

45 lines
1.5 KiB
XML
Executable File

<?xml version="1.0"?>
<ruleset name="WordPress Theme">
<description>PHPCS Ruleset for a WordPress Theme</description>
<!-- Check files in this directory and subdirectories. -->
<file>.</file>
<!-- Prevent sniffs of some directories. -->
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Pass flags to PHPCS:
p: Show progress of the run.
s: Show sniff codes in all reports.
v: Print verbose output.
-->
<arg value="psv"/>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Use the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="WordPress.VIP"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
</rule>
<!-- Page templates currently use underscores for historic reasons. -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>page_landing.php</exclude-pattern>
</rule>
<!-- Verify that no WP functions are used which are deprecated or removed. -->
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="4.4"/>
</properties>
</rule>
<!-- Check all globals have the expected prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="CHILD, genesis"/>
</properties>
</rule>
<!-- Allow theme-specific exceptions to WordPress filename rules. -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="is_theme" value="true"/>
</properties>
</rule>
</ruleset>