Skip to content

Commit

Permalink
Coding Standards: Exclude test files from filesystem sniffs.
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Dec 19, 2024
1 parent 00a2e7f commit bc6b8d7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,20 @@
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>
</rule>

<!-- Exclude test files from overriding globals sniff. -->
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>
</rule>

<!-- Exclude test files from some filesystem sniffs. -->
<rule ref="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents">
<exclude-pattern>/tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents">
<exclude-pattern>/tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.unlink_unlink">
<exclude-pattern>/tests/phpunit/*</exclude-pattern>
</rule>
</ruleset>

0 comments on commit bc6b8d7

Please sign in to comment.