-
Notifications
You must be signed in to change notification settings - Fork 1
/
ruleset.xml
75 lines (75 loc) · 3.52 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="gzero-ruleset">
<description>GZERO CMS PHP Coding Standards
</description>
<exclude-pattern>*/migrations/*</exclude-pattern>
<rule ref="PSR1"/>
<rule ref="PSR2">
<!--but exclude their code ClassDeclaration-->
<exclude name="PSR2.Classes.ClassDeclaration"/>
</rule>
<rule ref="PEAR">
<!--We use PSR2-->
<exclude name="PEAR.Classes"/>
<exclude name="PEAR.Files"/>
<exclude name="PEAR.Commenting.ClassComment"/>
<exclude name="PEAR.Commenting.FileComment"/>
<!--No _ in private methods/variables-->
<exclude name="PEAR.NamingConventions"/>
</rule>
<rule ref="Squiz">
<exclude name="Squiz.Classes.ClassDeclaration"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing"/>
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing"/>
<exclude name="Squiz.NamingConventions"/>
<exclude name="Squiz.Commenting"/>
<exclude name="Squiz.Files"/>
<exclude name="Squiz.Formatting"/>
<exclude name="Squiz.PHP.CommentedOutCode"/>
<exclude name="Squiz.Operators.ComparisonOperatorUsage"/>
<exclude name="Squiz.PHP.DisallowComparisonAssignment"/>
<exclude name="Squiz.Strings"/>
<exclude name="Squiz.ControlStructures.ElseIfDeclaration"/>
<exclude name="Squiz.ControlStructures.InlineIfDeclaration"/>
<!-- Issue with our arrays -->
<exclude name="Generic.Formatting.MultipleStatementAlignment"/>
<!-- Spaces before object operator -> -->
<exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
<!-- Disabled because returning error on function($arg1, $arg2 = true)-->
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing"/>
<exclude name="Squiz.PHP.DisallowInlineIf"/>
<!-- Passing new as argument to function -->
<exclude name="Squiz.Objects.ObjectInstantiation"/>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="130"/>
<property name="absoluteLineLimit" value="130"/>
</properties>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.Commenting.Fixme"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Metrics.NestingLevel"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="MySource.PHP.GetRequestData"/>
<rule ref="MySource.PHP.AjaxNullComparison"/>
</ruleset>