forked from pressbooks/pressbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.ruleset.xml
36 lines (36 loc) · 1.79 KB
/
phpcs.ruleset.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
33
34
35
36
<?xml version="1.0"?>
<ruleset>
<!-- Use Pressbooks Coding Standards -->
<rule ref="vendor/pressbooks/coding-standards">
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase"/>
<exclude name="HM.PHP.Isset.MultipleArguments"/>
<!-- TODO: These should be re-enabled sooner than later... -->
<exclude name="Squiz.Commenting"/>
<exclude name="Generic.Commenting"/>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName">
<!-- Exclude classes that override WP Core: -->
<exclude-pattern>/inc/admin/class-catalog-list-table.php</exclude-pattern>
<exclude-pattern>/inc/admin/class-network-managers-list-table.php</exclude-pattern>
<exclude-pattern>/api/endpoints/controller/*</exclude-pattern>
<exclude-pattern>/inc/modules/export/class-table.php</exclude-pattern>
</rule>
<!-- Disable Side Effects and MissingNamespace rules for bootstrapping files: -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>/pressbooks.php</exclude-pattern>
<exclude-pattern>/functions.php</exclude-pattern>
<exclude-pattern>/compatibility.php</exclude-pattern>
</rule>
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>/pressbooks.php</exclude-pattern>
<exclude-pattern>/functions.php</exclude-pattern>
<exclude-pattern>/compatibility.php</exclude-pattern>
</rule>
<!-- Disable all rules for these files: -->
<exclude-pattern>/hm-autoloader.php</exclude-pattern>
<exclude-pattern>*.blade.php</exclude-pattern>
<!-- Run against the PHPCompatibility ruleset -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="8.1-8.2"/>
</ruleset>