forked from WordPress/WordPress-Coding-Standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.ruleset.xml.example
37 lines (28 loc) · 1.33 KB
/
project.ruleset.xml.example
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 name="A Sample WordPress project">
<description>A custom set of rules to check for a given WordPress project</description>
<!--
You can hard-code ignore patterns directly into your
custom standard so you don't have to specify the
patterns on the command line.
The following two tags are equivalent to the command line
argument: \-\-ignore=*/tests/*,*/data/*
-->
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/data/*</exclude-pattern>
<!--
If we only want to include one rule from a standard, we point to the specific class we want to use.
-->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<!--
We may also want to to include all the rules in a standard
-->
<rule ref="WordPress" />
<!--
We may want a middle ground though. The best way to do this is add the entire ruleset, then rule by rule, remove ones that don't suit a project. We can do this by running `phpc ` with the '-s' flag, to see the names of the different Sniffs, as their rules are broken. From here, we can opt to exclude problematic sniffs like so.
-->
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
<exclude name="WordPress.Functions.FunctionCallSignature" />
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration" />-->
</rule>
</ruleset>