generated from niiknow/vue-wp-plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
94 lines (81 loc) · 3.27 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0"?>
<ruleset name="SGCS-WP">
<description>Coding Standards</description>
<file>includes</file>
<file>tests/phpunit</file>
<!--
* Exclude files and folders.
*
* <exclude-pattern>/index.php</exclude-pattern>
* <exclude-pattern>*/resources/views/*</exclude-pattern>
-->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/inc/class-wp-rest-controller.php</exclude-pattern>
<!-- PSR1 rules -->
<rule ref="PSR1"/>
<!-- PSR2 rules -->
<rule ref="PSR2">
<exclude name="PSR1.Methods.CamelCapsMethodName"/>
</rule>
<!-- PSR12 rules -->
<rule ref="PSR12">
<exclude name="PSR12" />
<exclude name="PSR12.Files.DeclareStatement" />
</rule>
<!-- Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting. -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4" />
<property name="tabIndent" value="false" />
</properties>
</rule>
<!-- All PHP files MUST use the Unix LF (linefeed) line ending. -->
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="20"/>
</properties>
</rule>
<!-- All PHP files MUST end with a single blank line. -->
<rule ref="PSR2.Files.EndFileNewline" />
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- Generic rules, excluding some -->
<rule ref="Generic">
<exclude name="Generic.PHP.RequireStrictTypes"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound"/>
<exclude name="Generic.Arrays.ArrayIndent.KeyIncorrect"/>
<exclude name="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
<exclude name="Generic.Files.EndFileNoNewline.Found"/>
<exclude name="Generic.Files.InlineHTML.Found"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="Generic.Files.LowercasedFilename.NotFound"/>
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
<exclude name="Generic.NamingConventions.CamelCapsFunctionName"/>
<exclude name="Generic.Formatting.SpaceAfterNot"/>
<exclude name="PSR1.Methods.CamelCapsMethodName"/>
<exclude name="Generic.PHP.ClosingPHPTag.NotFound"/>
<exclude name="Generic.PHP.UpperCaseConstant.Found"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
<exclude name="Generic.Classes.OpeningBraceSameLine"/>
<exclude name="Generic.ControlStructures.DisallowYodaConditions.Found"/>
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine"/>
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen"/>
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose"/>
</rule>
<!-- Exclude all PEAR rules -->
<rule ref="PEAR">
<exclude name="PEAR"/>
</rule>
<!-- Exclude all Squiz rules -->
<rule ref="Squiz">
<exclude name="Squiz"/>
</rule>
</ruleset>