Skip to content

Commit cb22735

Browse files
GaryJonesclaude
andcommitted
ci: exclude tests directory from PHPCS checks
Replace individual rule exclusions with a complete tests directory exclusion, matching the approach used in other plugins like zoninator and co-authors-plus. Test files have different coding requirements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent ebee335 commit cb22735

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

.phpcs.xml.dist

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,5 @@
3535

3636
<exclude-pattern>*/node_modules/*</exclude-pattern>
3737
<exclude-pattern>*/vendor/*</exclude-pattern>
38-
39-
<!-- Allow PSR-4 naming in tests directory -->
40-
<rule ref="WordPress.Files.FileName">
41-
<exclude-pattern>tests/</exclude-pattern>
42-
</rule>
43-
44-
<!-- Allow short ternary in test bootstrap -->
45-
<rule ref="Universal.Operators.DisallowShortTernary">
46-
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
47-
</rule>
48-
49-
<!-- Allow $_SERVER access in test bootstrap -->
50-
<rule ref="WordPress.Security.ValidatedSanitizedInput">
51-
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
52-
</rule>
38+
<exclude-pattern>*/tests/*</exclude-pattern>
5339
</ruleset>

0 commit comments

Comments
 (0)