<commit_before><?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for AMP">

	<rule ref="WordPress-Core" />
	<rule ref="WordPress-Docs">
		<exclude-pattern>tests/*</exclude-pattern>
	</rule>
	<rule ref="WordPress-Extra" />

	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" value="amp,default" />
		</properties>
	</rule>

	<rule ref="WordPress.Files.FileName.InvalidClassFileName">
		<exclude-pattern>tests/*</exclude-pattern>
		<exclude-pattern>includes/admin/class-amp-customizer.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-dailymotion-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-facebook-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-gallery-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-instagram-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-pinterest-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-soundcloud-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-twitter-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-vimeo-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-vine-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-youtube-embed.php</exclude-pattern>
		<exclude-pattern>wpcom/class-amp-polldaddy-embed.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow">
		<exclude-pattern>tests/test-tag-and-attribute-sanitizer.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned">
		<exclude-pattern>tests/test-tag-and-attribute-sanitizer.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.WP.AlternativeFunctions">
		<exclude-pattern>bin/*</exclude-pattern>
	</rule>
	<rule ref="WordPress.WP.EnqueuedResources">
		<exclude-pattern>includes/actions/class-amp-paired-post-actions.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.NamingConventions.ValidVariableName">
		<properties>
			<property name="customPropertiesWhitelist" type="array">
				<element value="childNodes"/>
				<element value="tagName"/>
				<element value="textContent"/>
				<element value="parentNode"/>
				<element value="nodeType"/>
				<element value="nodeName"/>
				<element value="nextSibling"/>
				<element value="previousSibling"/>
				<element value="firstChild"/>
				<element value="lastChild"/>
				<element value="nodeValue"/>
				<element value="DEFAULT_ARGS"/>
				<element value="documentElement"/>
				<element value="removeChild"/>
				<element value="ownerDocument"/>
				<element value="DEFAULT_WIDTH"/>
				<element value="DEFAULT_HEIGHT"/>
			</property>
		</properties>
	</rule>

	<!-- Prevent false positives for translator comments by adjusting the threshold for commented out code. -->
	<rule ref="Squiz.PHP.CommentedOutCode">
		<properties>
			<property name="maxPercentage" value="50" />
		</properties>
	</rule>

	<!-- Include sniffs for PHP cross-version compatibility. -->
	<config name="testVersion" value="5.4-99.0"/>
	<rule ref="PHPCompatibility">
		<exclude-pattern>bin/*</exclude-pattern>
	</rule>

	<arg value="s"/>
	<arg name="extensions" value="php"/>
	<file>.</file>

	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>build/*</exclude-pattern>
	<exclude-pattern>includes/sanitizers/class-amp-allowed-tags-generated.php</exclude-pattern>
</ruleset>
<commit_msg>Speed up PHPCS<commit_after><?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for AMP">

	<rule ref="WordPress-Core" />
	<rule ref="WordPress-Docs">
		<exclude-pattern>tests/*</exclude-pattern>
	</rule>
	<rule ref="WordPress-Extra" />

	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" value="amp,default" />
		</properties>
	</rule>

	<rule ref="WordPress.Files.FileName.InvalidClassFileName">
		<exclude-pattern>tests/*</exclude-pattern>
		<exclude-pattern>includes/admin/class-amp-customizer.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-dailymotion-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-facebook-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-gallery-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-instagram-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-pinterest-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-soundcloud-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-twitter-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-vimeo-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-vine-embed.php</exclude-pattern>
		<exclude-pattern>includes/embeds/class-amp-youtube-embed.php</exclude-pattern>
		<exclude-pattern>wpcom/class-amp-polldaddy-embed.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow">
		<exclude-pattern>tests/test-tag-and-attribute-sanitizer.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned">
		<exclude-pattern>tests/test-tag-and-attribute-sanitizer.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.WP.AlternativeFunctions">
		<exclude-pattern>bin/*</exclude-pattern>
	</rule>
	<rule ref="WordPress.WP.EnqueuedResources">
		<exclude-pattern>includes/actions/class-amp-paired-post-actions.php</exclude-pattern>
	</rule>
	<rule ref="WordPress.NamingConventions.ValidVariableName">
		<properties>
			<property name="customPropertiesWhitelist" type="array">
				<element value="childNodes"/>
				<element value="tagName"/>
				<element value="textContent"/>
				<element value="parentNode"/>
				<element value="nodeType"/>
				<element value="nodeName"/>
				<element value="nextSibling"/>
				<element value="previousSibling"/>
				<element value="firstChild"/>
				<element value="lastChild"/>
				<element value="nodeValue"/>
				<element value="DEFAULT_ARGS"/>
				<element value="documentElement"/>
				<element value="removeChild"/>
				<element value="ownerDocument"/>
				<element value="DEFAULT_WIDTH"/>
				<element value="DEFAULT_HEIGHT"/>
			</property>
		</properties>
	</rule>

	<!-- Prevent false positives for translator comments by adjusting the threshold for commented out code. -->
	<rule ref="Squiz.PHP.CommentedOutCode">
		<properties>
			<property name="maxPercentage" value="50" />
		</properties>
	</rule>

	<!-- Include sniffs for PHP cross-version compatibility. -->
	<config name="testVersion" value="5.4-99.0"/>
	<rule ref="PHPCompatibility">
		<exclude-pattern>bin/*</exclude-pattern>
	</rule>

	<arg value="s"/>
	<arg name="extensions" value="php"/>
	<file>.</file>

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

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

	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>build/*</exclude-pattern>
	<exclude-pattern>includes/sanitizers/class-amp-allowed-tags-generated.php</exclude-pattern>
</ruleset>

{'fraction_non_alphanumeric': 0.17026509975403115, 'fraction_numerical': 0.003552883301448483, 'mean_word_length': 5.124686192468619, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 2, '>': 217, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1907129', 'n_tokens_mistral': 2611, 'n_tokens_neox': 2312, 'n_words': 312}