<?xml version="1.0"?>
<ruleset name="Remoji">
	<description>Coding standards for the Remoji plugin.</description>

	<!-- Scan the plugin by default. -->
	<file>.</file>

	<!-- Data, translations, polyfills and static assets are out of scope. -->
	<exclude-pattern>*/data/*</exclude-pattern>
	<exclude-pattern>*/lang/*</exclude-pattern>
	<exclude-pattern>*/lib/*</exclude-pattern>
	<exclude-pattern>*/assets/*</exclude-pattern>
	<exclude-pattern>*/wp_assets/*</exclude-pattern>

	<!-- Only PHP, show sniff codes + progress. -->
	<arg name="extensions" value="php"/>
	<arg value="ps"/>

	<!-- Plugin text domain + accepted global prefixes. -->
	<config name="text_domain" value="remoji"/>
	<config name="prefixes" value="remoji,REMOJI,Remoji"/>

	<rule ref="WordPress">
		<!-- The plugin deliberately uses the .cls.php / .tpl.php filename convention. -->
		<exclude name="WordPress.Files.FileName"/>

		<!-- Private members are prefixed with `_` throughout (long-standing convention); not renaming a stable API surface. -->
		<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
		<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>

		<!-- The codebase documents with `@since` headers rather than exhaustive @param/@return/@var/class/file blocks. -->
		<exclude name="Squiz.Commenting.FunctionComment"/>
		<exclude name="Squiz.Commenting.VariableComment"/>
		<exclude name="Squiz.Commenting.ClassComment"/>
		<exclude name="Squiz.Commenting.FileComment"/>
		<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
		<exclude name="Generic.Commenting.DocComment.ShortNotCapital"/>

		<!-- Yoda conditions are not required by the WordPress.org plugin guidelines; team style choice. -->
		<exclude name="WordPress.PHP.YodaConditions"/>

		<!-- The plugin owns a custom `{prefix}remoji_history` table; direct, uncached $wpdb access is intentional. -->
		<exclude name="WordPress.DB.DirectDatabaseQuery"/>
	</rule>

	<!-- NOTE: template-partial false positives (PrefixAllGlobals / GlobalVariablesOverride) and the f.cls
	     filesystem-utility sniffs are handled with in-file `phpcs:disable` comments rather than path-based
	     exclude-patterns, because path patterns are not applied when an editor lints a single file over stdin. -->
</ruleset>
