forked from beechit/TYPO3CMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruleset.xml
133 lines (115 loc) · 6.34 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="TYPO3CMS">
<description>This package contains a selection of sniffs which implements the Coding Guidelines for TYPO3CMS which was former known as TYPO3. Have a look at http://forge.typo3.org/projects/team-php_codesniffer/wiki</description>
<!-- Exclude third party code -->
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*typo3/contrib/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/adodb/adodb/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/extbase/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/fluid/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/indexed_search/Classes/Utility/DoubleMetaPhoneUtility.php</exclude-pattern>
<exclude-pattern>*typo3/sysext/openid/lib/php-openid/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/statictemplates/media/scripts/testscript.inc</exclude-pattern>
<exclude-pattern>*typo3/sysext/statictemplates/media/scripts/testscript_INT.php</exclude-pattern>
<exclude-pattern>*typo3/sysext/statictemplates/media/scripts/testscript_EXT.php</exclude-pattern>
<exclude-pattern>*phpunit/Classes/Database/TestCase.php</exclude-pattern>
<exclude-pattern>*phpunit/Tests/*</exclude-pattern>
<exclude-pattern>*phpunit/Classes/Interface/AccessibleObject.php</exclude-pattern>
<!-- Arrays -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<!-- Classes -->
<rule ref="../TYPO3SniffPool/Sniffs/Classes/LowercaseClassKeywordsSniff.php" />
<rule ref="Squiz.Classes.SelfMemberReference" />
<rule ref="Generic.Classes.DuplicateClassName" />
<!-- CodeAnalysis -->
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement" />
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier" />
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
<!-- Commenting -->
<rule ref="PEAR.Commenting.InlineComment" />
<rule ref="../TYPO3SniffPool/Sniffs/Commenting/DoubleSlashCommentsInNewLineSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/Commenting/ValidCommentLineLengthSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/Commenting/ClassDocCommentSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/Commenting/NoAuthorAnnotationInFunctionDocCommentSniff.php" />
<!-- Control structures -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/DisallowElseIfConstructSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/ValidBreakStatementsInSwitchesSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/AlignedBreakStatementSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/ValidDefaultStatementsInSwitchesSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/DisallowEachInLoopConditionSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/UnusedVariableInForEachLoopSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/ExtraBracesByAssignmentInLoopSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/SwitchDeclarationSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/ControlStructures/TernaryConditionalOperatorSniff.php" />
<!-- Debug -->
<rule ref="../TYPO3SniffPool/Sniffs/Debug/DebugCodeSniff.php">
<exclude-pattern>*typo3/sysext/core/Classes/Utility/DebugUtility.php</exclude-pattern>
</rule>
<!-- Files -->
<rule ref="Generic.Files.OneClassPerFile">
<exclude-pattern>*typo3/sysext/core/Migrations/Code/LegacyClassesForIde.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.OneInterfacePerFile" />
<rule ref="Generic.Files.ByteOrderMark" />
<rule ref="Generic.Files.LineEndings" />
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="130"/>
<property name="absoluteLineLimit" value="200"/>
</properties>
</rule>
<rule ref="../TYPO3SniffPool/Sniffs/Files/IncludingFileSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/Files/FilenameSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/Files/FileExtensionSniff.php" />
<!-- Formatting -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Functions -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Squiz.Scope.MethodScope" />
<!-- valid function name -->
<rule ref="../TYPO3SniffPool/Sniffs/Scope/AlwaysReturnSniff.php" />
<!-- Loops -->
<!-- NamingConventions -->
<rule ref="../TYPO3SniffPool/Sniffs/NamingConventions/ValidVariableNameSniff.php" />
<rule ref="Generic.NamingConventions.ConstructorName" />
<rule ref="../TYPO3SniffPool/Sniffs/NamingConventions/ValidFunctionNameSniff.php" />
<!-- Objects -->
<!-- Operators -->
<!-- PHP -->
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />
<rule ref="Generic.PHP.DisallowShortOpenTag" />
<rule ref="Squiz.PHP.NonExecutableCode" />
<rule ref="../TYPO3SniffPool/Sniffs/PHP/DisallowMultiplePHPTagsSniff.php" />
<rule ref="Generic.PHP.UpperCaseConstant" />
<rule ref="Generic.PHP.DeprecatedFunctions" />
<rule ref="Squiz.PHP.Eval">
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*typo3/sysext/install/Classes/CoreUpdates/LocalConfigurationUpdate.php</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.GlobalKeyword" />
<rule ref="Zend.Files.ClosingTag" />
<!-- Scope -->
<rule ref="Squiz.Scope.MemberVarScope" />
<!-- Strings -->
<rule ref="../TYPO3SniffPool/Sniffs/Strings/UnnecessaryStringConcatSniff.php" />
<rule ref="Squiz.Strings.DoubleQuoteUsage" />
<rule ref="../TYPO3SniffPool/Sniffs/Strings/ConcatenationSpacingSniff.php" />
<!-- Whitespace -->
<rule ref="Squiz.WhiteSpace.SemicolonSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="../TYPO3SniffPool/Sniffs/WhiteSpace/AssignmentArithmeticAndComparisonSpaceSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php" />
<rule ref="../TYPO3SniffPool/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php" />
<!--
@todo merge this two sniffs into one
Have a look at the wiki page for more informations
<rule ref="TYPO3SniffPool.Whitespace.WhitespaceAfterCommentSigns" />
<rule ref="TYPO3SniffPool.Commenting.SpaceAfterDoubleSlash" />
-->
<rule ref="../TYPO3SniffPool/Sniffs/WhiteSpace/AsteriksWhitespacesSniff.php" />
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing" />
</ruleset>