Mercurial > hg > isophonics-drupal-site
comparison vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?xml version="1.0"?> | |
2 <!-- See http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php --> | |
3 <ruleset name="Drupal"> | |
4 <description>Drupal coding standard</description> | |
5 <!-- All Drupal code files must be UTF-8 encoded and we treat them as such. --> | |
6 <arg name="encoding" value="utf-8"/> | |
7 | |
8 <arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/> | |
9 | |
10 <rule ref="Internal.NoCodeFound"> | |
11 <!-- Empty files are fine, might be used for testing. --> | |
12 <exclude-pattern>*</exclude-pattern> | |
13 </rule> | |
14 | |
15 <rule ref="Drupal.Commenting.FileComment"> | |
16 <!-- Do not run this sniff on txt files. --> | |
17 <exclude-pattern>*.txt</exclude-pattern> | |
18 </rule> | |
19 <rule ref="Drupal.Commenting.FileComment.SpacingAfterComment"> | |
20 <!-- Do not run this sniff on template files. --> | |
21 <exclude-pattern>*.tpl.php</exclude-pattern> | |
22 </rule> | |
23 <rule ref="Drupal.ControlStructures.ControlSignature"> | |
24 <!-- Do not run this sniff on template files. --> | |
25 <exclude-pattern>*.tpl.php</exclude-pattern> | |
26 </rule> | |
27 | |
28 <!-- Silence deprecated sniff that will be removed in Coder 9.x. --> | |
29 <rule ref="Drupal.Functions.FunctionDeclaration.SpaceAfter"> | |
30 <severity>0</severity> | |
31 </rule> | |
32 <rule ref="Drupal.Functions.FunctionDeclaration.SpaceBeforeParenthesis"> | |
33 <severity>0</severity> | |
34 </rule> | |
35 <!-- Silence mmethod name underscore warning which is coverd already in | |
36 Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps. --> | |
37 <rule ref="Drupal.Methods.MethodDeclaration.Underscore"> | |
38 <severity>0</severity> | |
39 </rule> | |
40 | |
41 <rule ref="Drupal.WhiteSpace.ScopeIndent"> | |
42 <!-- Do not run this sniff on template files, as the indentation might follow | |
43 the HTML --> | |
44 <exclude-pattern>*.tpl.php</exclude-pattern> | |
45 </rule> | |
46 | |
47 <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> | |
48 <rule ref="Generic.Files.ByteOrderMark" /> | |
49 <rule ref="Generic.Formatting.SpaceAfterCast" /> | |
50 | |
51 <rule ref="Generic.Functions.FunctionCallArgumentSpacing" /> | |
52 <rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma"> | |
53 <severity>0</severity> | |
54 </rule> | |
55 <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"> | |
56 <properties> | |
57 <property name="checkClosures" value="true"/> | |
58 </properties> | |
59 </rule> | |
60 | |
61 <rule ref="Generic.NamingConventions.ConstructorName" /> | |
62 <rule ref="Generic.NamingConventions.UpperCaseConstantName" /> | |
63 <rule ref="Generic.PHP.DeprecatedFunctions" /> | |
64 <rule ref="Generic.PHP.DisallowShortOpenTag" /> | |
65 <rule ref="Generic.PHP.LowerCaseKeyword" /> | |
66 <rule ref="Generic.PHP.UpperCaseConstant" /> | |
67 <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> | |
68 | |
69 <!-- Use Unix newlines --> | |
70 <rule ref="Generic.Files.LineEndings"> | |
71 <properties> | |
72 <property name="eolChar" value="\n"/> | |
73 </properties> | |
74 </rule> | |
75 | |
76 <rule ref="MySource.Debug.DebugCode" /> | |
77 <rule ref="PEAR.Files.IncludingFile" /> | |
78 <!-- Disable some error messages that we do not want. --> | |
79 <rule ref="PEAR.Files.IncludingFile.UseIncludeOnce"> | |
80 <severity>0</severity> | |
81 </rule> | |
82 <rule ref="PEAR.Files.IncludingFile.UseInclude"> | |
83 <severity>0</severity> | |
84 </rule> | |
85 <rule ref="PEAR.Files.IncludingFile.UseRequireOnce"> | |
86 <severity>0</severity> | |
87 </rule> | |
88 <rule ref="PEAR.Files.IncludingFile.UseRequire"> | |
89 <severity>0</severity> | |
90 </rule> | |
91 | |
92 <rule ref="PEAR.Functions.FunctionCallSignature"/> | |
93 <!-- Disable some error messages that we already cover. --> | |
94 <rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket"> | |
95 <severity>0</severity> | |
96 </rule> | |
97 <rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket"> | |
98 <severity>0</severity> | |
99 </rule> | |
100 <!-- Disable some error messages that we do not want. --> | |
101 <rule ref="PEAR.Functions.FunctionCallSignature.Indent"> | |
102 <severity>0</severity> | |
103 </rule> | |
104 <rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"> | |
105 <severity>0</severity> | |
106 </rule> | |
107 <rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine"> | |
108 <severity>0</severity> | |
109 </rule> | |
110 <rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine"> | |
111 <severity>0</severity> | |
112 </rule> | |
113 | |
114 <rule ref="PEAR.Functions.ValidDefaultValue" /> | |
115 | |
116 <rule ref="PSR2.Namespaces.NamespaceDeclaration" /> | |
117 <rule ref="PSR2.Namespaces.UseDeclaration" /> | |
118 | |
119 <rule ref="Squiz.Arrays.ArrayDeclaration" /> | |
120 <!-- Disable some error messages that we do not want. --> | |
121 <rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"> | |
122 <severity>0</severity> | |
123 </rule> | |
124 <rule ref="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned"> | |
125 <severity>0</severity> | |
126 </rule> | |
127 <rule ref="Squiz.Arrays.ArrayDeclaration.FirstValueNoNewline"> | |
128 <severity>0</severity> | |
129 </rule> | |
130 <rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"> | |
131 <severity>0</severity> | |
132 </rule> | |
133 <rule ref="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed"> | |
134 <severity>0</severity> | |
135 </rule> | |
136 <rule ref="Squiz.Arrays.ArrayDeclaration.NoComma"> | |
137 <severity>0</severity> | |
138 </rule> | |
139 <rule ref="Squiz.Arrays.ArrayDeclaration.NoCommaAfterLast"> | |
140 <severity>0</severity> | |
141 </rule> | |
142 <rule ref="Squiz.Arrays.ArrayDeclaration.NotLowerCase"> | |
143 <severity>0</severity> | |
144 </rule> | |
145 <rule ref="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed"> | |
146 <severity>0</severity> | |
147 </rule> | |
148 <rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"> | |
149 <severity>0</severity> | |
150 </rule> | |
151 <rule ref="Squiz.Arrays.ArrayDeclaration.ValueNoNewline"> | |
152 <severity>0</severity> | |
153 </rule> | |
154 | |
155 <rule ref="Squiz.Arrays.ArrayBracketSpacing" /> | |
156 | |
157 <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration" /> | |
158 <!-- Disable some error messages that we already cover. --> | |
159 <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.AsNotLower"> | |
160 <severity>0</severity> | |
161 </rule> | |
162 <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen"> | |
163 <severity>0</severity> | |
164 </rule> | |
165 <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose"> | |
166 <severity>0</severity> | |
167 </rule> | |
168 <rule ref="Squiz.ControlStructures.ForLoopDeclaration" /> | |
169 <!-- Disable some error messages that we already cover. --> | |
170 <rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen"> | |
171 <severity>0</severity> | |
172 </rule> | |
173 <rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose"> | |
174 <severity>0</severity> | |
175 </rule> | |
176 | |
177 <rule ref="Squiz.ControlStructures.SwitchDeclaration" /> | |
178 <!-- Disable some error messages that we do not want. --> | |
179 <rule ref="Squiz.ControlStructures.SwitchDeclaration.BreakIndent"> | |
180 <severity>0</severity> | |
181 </rule> | |
182 <rule ref="Squiz.ControlStructures.SwitchDeclaration.CaseIndent"> | |
183 <severity>0</severity> | |
184 </rule> | |
185 <rule ref="Squiz.ControlStructures.SwitchDeclaration.CloseBraceAlign"> | |
186 <severity>0</severity> | |
187 </rule> | |
188 <rule ref="Squiz.ControlStructures.SwitchDeclaration.DefaultIndent"> | |
189 <severity>0</severity> | |
190 </rule> | |
191 <rule ref="Squiz.ControlStructures.SwitchDeclaration.DefaultNoBreak"> | |
192 <severity>0</severity> | |
193 </rule> | |
194 <rule ref="Squiz.ControlStructures.SwitchDeclaration.EmptyCase"> | |
195 <severity>0</severity> | |
196 </rule> | |
197 <rule ref="Squiz.ControlStructures.SwitchDeclaration.EmptyDefault"> | |
198 <severity>0</severity> | |
199 </rule> | |
200 <rule ref="Squiz.ControlStructures.SwitchDeclaration.MissingDefault"> | |
201 <severity>0</severity> | |
202 </rule> | |
203 <rule ref="Squiz.ControlStructures.SwitchDeclaration.SpacingAfterCase"> | |
204 <severity>0</severity> | |
205 </rule> | |
206 <rule ref="Squiz.ControlStructures.SwitchDeclaration.SpacingAfterDefaultBreak"> | |
207 <severity>0</severity> | |
208 </rule> | |
209 <rule ref="Squiz.ControlStructures.SwitchDeclaration.SpacingBeforeBreak"> | |
210 <severity>0</severity> | |
211 </rule> | |
212 | |
213 <rule ref="Squiz.CSS.ClassDefinitionClosingBraceSpace" /> | |
214 <rule ref="Squiz.CSS.ClassDefinitionClosingBraceSpace.SpacingAfterClose"> | |
215 <severity>0</severity> | |
216 </rule> | |
217 <rule ref="Squiz.CSS.ClassDefinitionOpeningBraceSpace" /> | |
218 <rule ref="Squiz.CSS.ClassDefinitionOpeningBraceSpace.AfterNesting"> | |
219 <severity>0</severity> | |
220 </rule> | |
221 <rule ref="Squiz.CSS.ColonSpacing" /> | |
222 <rule ref="Squiz.CSS.DisallowMultipleStyleDefinitions" /> | |
223 <rule ref="Squiz.CSS.EmptyClassDefinition" /> | |
224 <rule ref="Squiz.CSS.EmptyStyleDefinition" /> | |
225 <rule ref="Squiz.CSS.Indentation"> | |
226 <properties> | |
227 <property name="indent" value="2"/> | |
228 </properties> | |
229 </rule> | |
230 <rule ref="Squiz.CSS.MissingColon" /> | |
231 <rule ref="Squiz.CSS.SemicolonSpacing" /> | |
232 | |
233 <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> | |
234 <properties> | |
235 <property name="equalsSpacing" value="1"/> | |
236 </properties> | |
237 </rule> | |
238 <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.NoSpaceBeforeArg"> | |
239 <severity>0</severity> | |
240 </rule> | |
241 | |
242 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> | |
243 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"> | |
244 <severity>0</severity> | |
245 </rule> | |
246 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace"> | |
247 <severity>0</severity> | |
248 </rule> | |
249 <!-- Standard yet to be finalized on this (https://www.drupal.org/node/1539712). --> | |
250 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing"> | |
251 <severity>0</severity> | |
252 </rule> | |
253 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.Indent"> | |
254 <severity>0</severity> | |
255 </rule> | |
256 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine"> | |
257 <severity>0</severity> | |
258 </rule> | |
259 | |
260 <rule ref="Squiz.PHP.LowercasePHPFunctions" /> | |
261 <rule ref="Squiz.PHP.NonExecutableCode" /> | |
262 <rule ref="Squiz.Strings.ConcatenationSpacing"> | |
263 <properties> | |
264 <property name="spacing" value="1"/> | |
265 <property name="ignoreNewlines" value="true"/> | |
266 </properties> | |
267 </rule> | |
268 <rule ref="Squiz.WhiteSpace.FunctionSpacing"> | |
269 <properties> | |
270 <property name="spacing" value="1"/> | |
271 </properties> | |
272 </rule> | |
273 <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing" /> | |
274 <rule ref="Squiz.WhiteSpace.SemicolonSpacing" /> | |
275 <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> | |
276 | |
277 <rule ref="Zend.Files.ClosingTag"> | |
278 <!-- Do not run this sniff on template files. --> | |
279 <exclude-pattern>*.tpl.php</exclude-pattern> | |
280 </rule> | |
281 | |
282 <!-- Ignore various version control directories. --> | |
283 <exclude-pattern>*/\.git/*</exclude-pattern> | |
284 <exclude-pattern>*/\.svn/*</exclude-pattern> | |
285 <exclude-pattern>*/\.hg/*</exclude-pattern> | |
286 <exclude-pattern>*/\.bzr/*</exclude-pattern> | |
287 </ruleset> |