3
3
4
4
<description >A custom set of code standard rules to check for Inpsyde Codex.</description >
5
5
6
+ <!-- TRUE, FALSE, NULL are constant, we write in uppercase. -->
7
+ <rule ref =" Generic.PHP.UpperCaseConstant" />
8
+
9
+ <!-- Allow . in hook names -->
10
+ <rule ref =" WordPress.NamingConventions.ValidHookName" >
11
+ <properties >
12
+ <property name =" additionalWordDelimiters" value =" ." />
13
+ </properties >
14
+ </rule >
15
+
16
+ <!-- Include the WordPress ruleset, with exclusions. -->
6
17
<rule ref =" WordPress" >
7
18
19
+ <exclude name =" WordPress.PHP.YodaConditions" />
20
+
8
21
<exclude name =" WordPress.Files.FileName" />
9
- <exclude name =" WordPress.PHP.YodaConditions" />
10
22
23
+ <exclude name =" Generic.PHP.LowerCaseConstant" />
24
+ <exclude name =" Generic.WhiteSpace.ScopeIndent.Incorrect" />
25
+ <exclude name =" Generic.Commenting.DocComment.MissingShort" />
11
26
<exclude name =" Generic.PHP.DisallowShortOpenTag" />
12
- <exclude name =" Generic.PHP.LowerCaseConstant" />
13
- <exclude name =" Generic.WhiteSpace.ScopeIndent.Incorrect" />
14
- <exclude name =" Generic.Commenting.DocComment.MissingShort" />
15
27
16
- <exclude name =" PEAR.Functions.FunctionCallSignature" />
28
+ <exclude name =" Squiz.Commenting.FileComment.MissingPackageTag" />
29
+ <exclude name =" Squiz.Commenting.FileComment.Missing" />
17
30
18
- <!-- Remove spaces before types check. -->
19
- <exclude name =" Squiz.Commenting.VariableComment.VarIndent" />
20
- <exclude name =" Squiz.Commenting.FunctionComment.SpacingBeforeParamType" />
21
- <exclude name =" Squiz.Commenting.FunctionComment.SpacingBeforeParams" />
31
+ <exclude name =" PEAR.Functions.FunctionCallSignature" />
22
32
23
- <!-- no need for @package in files -->
24
- <exclude name =" Squiz.Commenting.FileComment.MissingPackageTag" />
33
+ <!-- Remove spaces before types check. -->
34
+ <exclude name =" Squiz.Commenting.VariableComment.VarIndent" />
35
+ <exclude name =" Squiz.Commenting.FunctionComment.SpacingBeforeParamType" />
36
+ <exclude name =" Squiz.Commenting.FunctionComment.SpacingBeforeParams" />
25
37
26
- <!-- Exclude full stops on inline comment. -->
27
- <exclude name =" Squiz.Commenting.InlineComment.InvalidEndChar" />
28
- <exclude name =" Squiz.Commenting.FunctionComment.MissingParamComment" />
38
+ <!-- Exclude Full Stops on inline comment. -->
39
+ <exclude name =" Squiz.Commenting.InlineComment.InvalidEndChar" />
40
+ <exclude name =" Squiz.Commenting.FunctionComment.MissingParamComment" />
29
41
30
42
<!-- Remove empty line not required before block comment -->
31
- <exclude name =" Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
43
+ <exclude name =" Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
32
44
<!-- Remove rule for /** style for each var -->
33
- <exclude name =" Squiz.Commenting.VariableComment.WrongStyle" />
34
-
35
- <exclude name =" WordPress.WhiteSpace.ScopeIndent.Incorrect" />
36
- <exclude name =" WordPress.Arrays.ArrayKeySpacingRestrictions" />
37
- <exclude name =" WordPress.Arrays.ArrayDeclaration.KeyNotAligned" />
45
+ <exclude name =" Squiz.Commenting.VariableComment.WrongStyle" />
38
46
47
+ <!-- <exclude name="WordPress.XSS.EscapeOutput" /> -->
48
+ <exclude name =" WordPress.WhiteSpace.ScopeIndent.Incorrect" />
49
+ <exclude name =" WordPress.Arrays.ArrayKeySpacingRestrictions" />
50
+ <exclude name =" WordPress.Arrays.ArrayDeclaration.KeyNotAligned" />
39
51
<!-- Remove spaces instead of tabs check -->
40
- <exclude name =" WordPress.Arrays.ArrayDeclaration.ValueNotAligned" />
41
- <exclude name =" WordPress.Arrays.ArrayDeclaration.CloseBraceNotAligned" />
52
+ <exclude name =" WordPress.Arrays.ArrayDeclaration.ValueNotAligned" />
53
+ <exclude name =" WordPress.Arrays.ArrayDeclaration.CloseBraceNotAligned" />
54
+ <!-- <exclude name="WordPress.Variables.GlobalVariables" /> -->
42
55
</rule >
56
+
43
57
</ruleset >
0 commit comments