phpcs.xml 1.11 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
	<description>Generally-applicable sniffs for WordPress plugins</description>

	<!--
	Pass some flags to PHPCS:
	 p flag: Show progress of the run.
	 s flag: Show sniff codes in all reports.
	-->
	<arg value="ps" />

	<!-- Only check the PHP files. -->
	<arg name="extensions" value="php" />

	<!-- Check all files in this directory and the directories below it. -->
	<file>.</file>

	<!-- Exclude a few directories and autogenerated files. -->
	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/</exclude-pattern>

22
	<rule ref="WordPress">
Erick Hitter's avatar
Erick Hitter committed
23
		<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
24 25 26
		<exclude name="WordPress.PHP.DisallowShortTernary" />
		<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
	</rule>
Erick Hitter's avatar
Erick Hitter committed
27 28 29 30 31 32 33 34 35 36 37
	<rule ref="WordPressVIPMinimum" />
	<!--<rule ref="WordPress-VIP-Go" />-->

	<config name="minimum_supported_wp_version" value="4.9" />

	<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
		<properties>
			<property name="prefixes" type="array" value="camo" />
		</properties>
	</rule>
</ruleset>