forked from lmc-eu/steward
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruleset.xml
60 lines (54 loc) · 3.32 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
<?xml version="1.0"?>
<ruleset name="Steward codesniffer ruleset based on PSR2">
<!-- Apply all rules from PSR-2 -->
<rule ref="PSR2"/>
<!-- Class and Interface names should be unique in a project. They should never be duplicated. -->
<rule ref="Generic.Classes.DuplicateClassName"/>
<!-- Incrementers in nested loops should use different variable names. -->
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<!-- Control Structures must have at least one statement inside of the body. -->
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<!-- For loops that have only a second expression (the condition) should be converted to while loops. -->
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<!-- If statements that are always evaluated should not be used. -->
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<!-- Methods should not be declared final inside of classes that are declared final. -->
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<!-- Methods should not be defined that only call the parent method. -->
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<!-- There should only be one class defined in a file. -->
<rule ref="Generic.Files.OneClassPerFile"/>
<!-- There should only be one interface defined in a file. -->
<rule ref="Generic.Files.OneInterfacePerFile"/>
<!-- There should only be one trait defined in a file. -->
<rule ref="Generic.Files.OneTraitPerFile"/>
<!-- Multiple statements are not allowed on a single line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<!-- Exactly one space is allowed after a cast. -->
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<!-- When referencing arrays you should not put whitespace around the opening bracket or before the closing bracket. -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<!-- The self keyword should be used instead of the current class name -->
<rule ref="Squiz.Classes.SelfMemberReference"/>
<!-- The asterisks in a doc comment should align, and there should be one space between the asterisk and tags. -->
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
<!-- Tests that the ++ operators are used when possible and not used when it makes the code confusing. -->
<rule ref="Squiz.Operators.IncrementDecrementUsage"/>
<!-- Verifies that class members have scope modifiers. -->
<rule ref="Squiz.Scope.MemberVarScope"/>
<!-- Casts should not have whitespace inside the parentheses. -->
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<!-- Semicolons should not have spaces before them. -->
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<!-- The php constructs like echo, return, include, etc. should have one space after them. -->
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<!-- The php keywords static, public, private, and protected should have one space after them. -->
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
<file>./src/</file>
<file>./src-tests/</file>
<exclude-pattern>bootstrap.php</exclude-pattern>
<exclude-pattern>src-tests/coverage/*</exclude-pattern>
<exclude-pattern>src-tests/FunctionalTests/logs/coverage/*</exclude-pattern>
<arg value="p"/>
<arg name="encoding" value="utf-8"/>
</ruleset>