Changeset 5981
- Timestamp:
- 02/01/12 13:59:28 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build-tools/CodeSniffer/Standards/Clansuite/ClansuiteCodingStandard.php
r5916 r5981 45 45 return array( 46 46 47 # Files 48 49 #'Generic/Sniffs/Files/LineEndingsSniff.php', 50 'PEAR/Sniffs/Files/IncludingFileSniff.php', 51 52 # Formatting 53 54 # Ensures there is a single space after cast tokens. 55 'Generic/Sniffs/Formatting/SpaceAfterCastSniff.php', 56 # Makes sure that any use of Double Quotes ("") are warranted. 57 'Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php', 47 # CodeAnalysis 48 49 'Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php', 50 'Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php', 51 # Detects for-loops that use a function call in the test expression. 52 'Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php', 53 'Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php', 54 dirname(__FILE__) . '/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php', 55 56 # Commenting 57 58 #'Squiz/Sniffs/Commenting/ClassCommentSniff.php', 59 #'Squiz/Sniffs/Commenting/FileCommentSniff.php', 60 #'Squiz/Sniffs/Commenting/FunctionCommentSniff.php', 61 #'Squiz/Sniffs/Commenting/VariableCommentSniff.php', 62 # prohibits the usage of "//", enforces usage of "#" 63 dirname(__FILE__) . '/Sniffs/Commenting/OneLineCommentSniff.php', 64 # every todo message needs a link to our bugtracker 65 dirname(__FILE__) . '/Sniffs/Commenting/TodoWithBugtrackerLinkSniff.php', 66 67 # ControlStructures 68 69 #'Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php', 70 'Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php', 71 72 # 1 empty line before control structures 73 dirname(__FILE__) . '/Sniffs/ControlStructures/ControlStructureBlankLineSniff.php', 74 75 dirname(__FILE__) . '/Sniffs/ControlStructures/ControlSignatureSniff.php', 76 77 'Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php', 78 'Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php', 58 79 59 80 # Functions & Braces … … 78 99 'Squiz/Sniffs/PHP/EvalSniff.php', 79 100 80 # Classes 81 82 'Squiz/Sniffs/Classes/ClassDeclarationSniff.php', 83 'Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php', 84 'Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php', 85 'Squiz/Sniffs/Classes/DuplicatePropertySniff.php', 86 # Constructor 87 # enforce PHP 5 constructor syntax "function __construct()" 88 'Generic/Sniffs/NamingConventions/ConstructorNameSniff.php', 89 90 # PHP 91 92 # Usage of @ is not allowed. 93 'Generic/Sniffs/PHP/NoSilencedErrorsSniff.php', 94 # Stops the usage of the "global" keyword. 95 'Squiz/Sniffs/PHP/GlobalKeywordSniff.php', 96 # Detects falsly used return, exit, break, continue statements 97 'Squiz/Sniffs/PHP/NonExecutableCodeSniff.php', 98 99 # Makes sure that shorthand PHP open tags are not used. 100 #'Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php', 101 # same as above, but a bit more strict 102 dirname(__FILE__) . '/Sniffs/PHP/OpeningClosingTagSniff.php', 101 # Operators 102 103 # enforce the use of IDENTICAL (===) type operators rather than EQUAL (==) operator 104 # enforce the use of "=== false" instead of "!" 105 'Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php', 106 # enforce the use of ++ operators when possible. 107 'Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php', 108 # Discourages the use of '&&' '||' '^' as representation for logical operators. 109 # Ensures that 'and' 'or' 'xor' are used as logical operators. 110 dirname(__FILE__) . '/Sniffs/Operators/ValidLogicalOperatorsSniff.php', 103 111 104 112 # WhiteSpace … … 124 132 'PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php', 125 133 126 # ControlStructures 127 128 #'Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php', 129 'Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php', 130 131 # 1 empty line before control structures 132 dirname(__FILE__) . '/Sniffs/ControlStructures/ControlStructureBlankLineSniff.php', 133 134 dirname(__FILE__) . '/Sniffs/ControlStructures/ControlSignatureSniff.php', 135 136 'Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php', 137 'Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php', 138 # VersionControl -> SVN 139 # Tests that the correct Subversion properties are set. 140 #'Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php', 134 # Files 135 136 #'Generic/Sniffs/Files/LineEndingsSniff.php', 137 'PEAR/Sniffs/Files/IncludingFileSniff.php', 138 139 # Formatting 140 141 # Ensures there is a single space after cast tokens. 142 'Generic/Sniffs/Formatting/SpaceAfterCastSniff.php', 143 # Makes sure that any use of Double Quotes ("") are warranted. 144 'Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php', 145 146 # Classes 147 148 'Squiz/Sniffs/Classes/ClassDeclarationSniff.php', 149 'Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php', 150 'Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php', 151 'Squiz/Sniffs/Classes/DuplicatePropertySniff.php', 152 # Constructor 153 # enforce PHP 5 constructor syntax "function __construct()" 154 'Generic/Sniffs/NamingConventions/ConstructorNameSniff.php', 155 156 # PHP 157 158 # Usage of @ is not allowed. 159 'Generic/Sniffs/PHP/NoSilencedErrorsSniff.php', 160 # Stops the usage of the "global" keyword. 161 'Squiz/Sniffs/PHP/GlobalKeywordSniff.php', 162 # Detects falsly used return, exit, break, continue statements 163 'Squiz/Sniffs/PHP/NonExecutableCodeSniff.php', 164 165 # Makes sure that shorthand PHP open tags are not used. 166 #'Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php', 167 # same as above, but a bit more strict 168 dirname(__FILE__) . '/Sniffs/PHP/OpeningClosingTagSniff.php', 141 169 142 170 # CSS … … 165 193 'Generic/Sniffs/PHP/LowerCaseConstantSniff.php', 166 194 167 # Operators168 169 # enforce the use of IDENTICAL (===) type operators rather than EQUAL (==) operator170 # enforce the use of "=== false" instead of "!"171 'Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',172 # enforce the use of ++ operators when possible.173 'Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',174 # Discourages the use of '&&' '||' '^' as representation for logical operators.175 # Ensures that 'and' 'or' 'xor' are used as logical operators.176 dirname(__FILE__) . '/Sniffs/Operators/ValidLogicalOperatorsSniff.php',177 178 # Comments179 180 #'Squiz/Sniffs/Commenting/ClassCommentSniff.php',181 #'Squiz/Sniffs/Commenting/FileCommentSniff.php',182 #'Squiz/Sniffs/Commenting/FunctionCommentSniff.php',183 #'Squiz/Sniffs/Commenting/VariableCommentSniff.php',184 # prohibits the usage of "//", enforces usage of "#"185 dirname(__FILE__) . '/Sniffs/Commenting/OneLineCommentSniff.php',186 # every todo message needs a link to our bugtracker187 dirname(__FILE__) . '/Sniffs/Commenting/TodoWithBugtrackerLinkSniff.php',188 189 # CodeAnalysis190 191 'Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',192 'Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',193 # Detects for-loops that use a function call in the test expression.194 'Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',195 'Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',196 dirname(__FILE__) . '/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',197 195 ); 198 196 }
Note: See TracChangeset
for help on using the changeset viewer.
