<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
	<description>WebAppick dev PHP_CodeSniffer ruleset.</description>

	<file>.</file>

	<!-- Exclude paths -->
	<exclude-pattern>tests/cli/</exclude-pattern>
	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>

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

	<!-- Strip the file paths in reports down to the relevant bit. -->
	<arg name="basepath" value="./" />

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

	<!-- Configs -->
<!--	<config name="minimum_supported_wp_version" value="5.0" />-->
<!--	<config name="testVersion" value="5.6-" />-->

	<!-- Rules -->
	<rule ref="WordPress">
        <exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
    </rule>
	<rule ref="WordPress-Core" />
	<rule ref="WordPress-Extra" />
	<rule ref="WordPress-VIP-Go" />

	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" type="array" value="webappick" />
		</properties>
	</rule>

	<rule ref="PHPCompatibility">
		<exclude-pattern>tests/</exclude-pattern>
	</rule>

	<rule ref="WordPress.Files.FileName.InvalidClassFileName">
		<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
		<exclude-pattern>tests/*</exclude-pattern>
		<exclude-pattern>src/*</exclude-pattern>
	</rule>

	<rule ref="Generic.Commenting">
		<exclude-pattern>tests/</exclude-pattern>
	</rule>

	<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
		<exclude-pattern>tests/e2e-tests/</exclude-pattern>
	</rule>

	<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
		<exclude-pattern>i18n/</exclude-pattern>
		<exclude-pattern>src/</exclude-pattern>
	</rule>

	<rule ref="Generic">
		<exclude-pattern>.</exclude-pattern>
		<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags"/>
		<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
		<exclude name="Generic.WhiteSpace.DisallowTabIndent.NonIndentTabsUsed" />
		<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
		<exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
		<exclude name="Generic.Files.LineLength.TooLong" />
	</rule>
</ruleset>
