<?xml version="1.0"?>
<ruleset name="WooCommerce Coding Standards">
	<description>WooCommerce Points and Rewards ruleset.</description>

	<!-- Configs -->
	<config name="minimum_supported_wp_version" value="4.7" />
	<config name="testVersion" value="7.2-" />

	<!-- Rules -->
	<rule ref="WooCommerce-Core">
		<!-- We don't require conforming to WP file naming -->
		<exclude name="WordPress.Files.FileName"/>

		<!-- Rules related to comments. We will come back to implementing these rules-->
		<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
		<exclude name="Generic.Commenting.DocComment.MissingShort"/>
		<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
		<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
		<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
		<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
		<exclude name="Squiz.Commenting.FileComment"/>
		<exclude name="WooCommerce.Commenting.CommentHooks.MissingSinceComment"/>
		<exclude name="WooCommerce.Commenting.CommentHooks.MissingHookComment"/>
	</rule>

	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" type="array" value="woocommerce-points-and-rewards" />
		</properties>
	</rule>

	<!-- Check the main PHP file and everything in /includes -->
	<arg name="extensions" value="php"/>
	<file>.</file>

	<!-- Show progress and sniff codes in all reports -->
	<arg value="ps"/>

	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>./.github/*</exclude-pattern>
	<exclude-pattern>./assets/*</exclude-pattern>
	<exclude-pattern>./build/*</exclude-pattern>
	<exclude-pattern>./tests/*</exclude-pattern>
</ruleset>
