-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.phpcs.xml
More file actions
46 lines (38 loc) · 1.67 KB
/
Copy path.phpcs.xml
File metadata and controls
46 lines (38 loc) · 1.67 KB
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
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0"?>
<ruleset name="GiveWP Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- Set a description for this ruleset. -->
<description>We love clean code for GiveWP. This will let us enforce that easily.</description>
<!-- Exclude directories we don't want checked. -->
<exclude-pattern>build.php</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>languages/*</exclude-pattern>
<exclude-pattern>resources/css/*</exclude-pattern>
<exclude-pattern>resources/js/*</exclude-pattern>
<exclude-pattern>resources/images/*</exclude-pattern>
<!-- Bring in WP rules. -->
<rule ref="WordPress-Core">
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<exclude-pattern>src/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<exclude-pattern>src/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>src/*</exclude-pattern>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>warning</type>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="give-test-data"/>
</properties>
</rule>
</ruleset>