-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpcs.xml
32 lines (26 loc) · 1.18 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0"?>
<ruleset name="Custom WordPress Standards">
<!-- Set the base standard to WordPress -->
<rule ref="WordPress"/>
<!-- Define files and folders to scan -->
<file>.</file>
<!-- Exclude test files from FileName rules because we need to match Codeception autoload -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- We should use WP_Filesystem or another safer solution but this change can be more complex -->
<rule ref="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents">
<exclude-pattern>src</exclude-pattern>
</rule>
<!-- Exclude bootstrap from the SeparateFunctionsFromOO.Mixed rule -->
<rule ref="Universal.Files.SeparateFunctionsFromOO.Mixed">
<exclude-pattern>tests/unit/_bootstrap.php</exclude-pattern>
</rule>
<!-- Exclude test files from the PSR2.Methods.MethodDeclaration.Underscore rule due to methods _after() and _before() -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>tests/integration</exclude-pattern>
<exclude-pattern>tests/unit</exclude-pattern>
</rule>
<!-- Skip the vendor directory -->
<exclude-pattern>vendor/*</exclude-pattern>
</ruleset>