phpcs.xml 997 Bytes
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 22 23
<?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>

	<rule ref="WordPress" />
	<rule ref="WordPressVIPMinimum" />
Erick Hitter's avatar
Erick Hitter committed
24
	<rule ref="WordPress-VIP-Go" />
Erick Hitter's avatar
Erick Hitter committed
25
	<rule ref="SlevomatCodingStandard.TypeHints" />
Erick Hitter's avatar
Erick Hitter committed
26 27 28 29 30 31 32 33 34

	<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>