<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
	<description>Generally-applicable sniffs for WordPress plugins</description>

	<file>.</file>
	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/phpunit/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>*/tests/*</exclude-pattern>
	<exclude-pattern>*/index.php</exclude-pattern>
	<exclude-pattern>*/index.asset.php</exclude-pattern>

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

	<!-- Show progress, show the error codes for each message (source). -->
	<arg value="ps"/>

	<!-- Strip the filepaths down to the relevant bit. -->
	<arg name="basepath" value="./"/>

	<!-- Check up to 8 files simultaneously. -->
	<arg name="parallel" value="8"/>

	<!-- Use WordPress ruleset. -->
	<rule ref="WordPress">
		<exclude name="WordPress.WP.I18n" />
	</rule>
	<rule ref="WordPress.Files.FileName">
		<exclude-pattern>*/phpunit/tests/*\.php$</exclude-pattern>
	</rule>

	<!-- Add in some extra rules from other standards. -->
	<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
	<rule ref="Generic.Commenting.Todo"/>
	<rule ref="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>

</ruleset>
