forked from typisttech/wp-better-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruleset.xml
148 lines (116 loc) · 5.41 KB
/
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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0"?>
<!--
~ WP Better Settings
~
~ A simplified OOP implementation of the WP Settings API.
~
~ @package TypistTech\WPBetterSettings
~
~ @author Typist Tech <[email protected]>
~ @copyright 2017 Typist Tech
~ @license GPL-2.0+
~
~ @see https://www.typist.tech/projects/wp-better-settings
~ @see https://github.com/TypistTech/wp-better-settings
-->
<ruleset name="PSR 2 and WordPress Coding Standards for Plugins">
<description>PSR 2 and WordPress Coding Standards for Plugins</description>
<file>./</file>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>/build/*</exclude-pattern>
<exclude-pattern>/lib/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/release/*</exclude-pattern>
<exclude-pattern>/tests/_data/*</exclude-pattern>
<exclude-pattern>/tests/_output/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<rule ref="PSR2"/>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/wp-better-settings.php</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine"/>
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint"/>
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener"/>
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser"/>
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
<exclude name="WordPress.WhiteSpace.CastStructureSpacing.NoSpaceBeforeOpenParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedClasses">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedParameters">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-better-settings"/>
</properties>
</rule>
<!--Tests-->
<rule ref="Squiz.Commenting.FileComment.WrongStyle">
<exclude-pattern>*/_bootstrap.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.InlineComment.SpacingAfter">
<exclude-pattern>*/_bootstrap.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.RestrictedVariables">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.SuperGlobalInputUsage">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.ValidatedSanitizedInput">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
</ruleset>