|
13 | 13 | <name>Variable declared in both var and argument scopes.</name>
|
14 | 14 | <severity>MAJOR</severity>
|
15 | 15 | <cardinality>SINGLE</cardinality>
|
16 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 16 | + <description><![CDATA[ <p>Variable should not be declared in both local and argument scopes.</p> ]]></description> |
17 | 17 | <tag>bug</tag>
|
18 | 18 | </rule>
|
19 | 19 | <rule>
|
20 | 20 | <key>ARG_VAR_MIXED</key>
|
21 | 21 | <name>Variable referenced in local and argument scopes.</name>
|
22 | 22 | <severity>MAJOR</severity>
|
23 | 23 | <cardinality>SINGLE</cardinality>
|
24 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 24 | + <description><![CDATA[ <p>Variable should not be referenced in local and argument scope.</p> ]]></description> |
25 | 25 | <tag>bug</tag>
|
26 | 26 | </rule>
|
27 | 27 | <rule>
|
28 | 28 | <key>NO_DEFAULT_INSIDE_SWITCH</key>
|
29 | 29 | <name>Missing default switch statement.</name>
|
30 | 30 | <severity>MAJOR</severity>
|
31 | 31 | <cardinality>SINGLE</cardinality>
|
32 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 32 | + <description><![CDATA[ <p>Not having a Default statement defined for a switch could pose potential issues.</p> ]]></description> |
33 | 33 | </rule>
|
34 | 34 | <rule>
|
35 | 35 | <key>GLOBAL_VAR</key>
|
36 | 36 | <name>Global variable exists.</name>
|
37 | 37 | <severity>CRITICAL</severity>
|
38 | 38 | <cardinality>SINGLE</cardinality>
|
39 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 39 | + <description><![CDATA[ <p>Identifier is global. Referencing in a CFC or function should be avoided.</p> ]]></description> |
40 | 40 | <tag>bug</tag>
|
41 | 41 | </rule>
|
42 | 42 | <rule>
|
43 | 43 | <key>NESTED_CFOUTPUT</key>
|
44 | 44 | <name>Nested cfoutput with cfquery tag.</name>
|
45 | 45 | <severity>MINOR</severity>
|
46 | 46 | <cardinality>SINGLE</cardinality>
|
47 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 47 | + <description><![CDATA[ <p>Nested CFOutput, outer CFOutput has <code>@query</code>.</p> ]]></description> |
48 | 48 | </rule>
|
49 | 49 | <rule>
|
50 | 50 | <key>OUTPUT_ATTR</key>
|
51 | 51 | <name>Tag should have output='false'.</name>
|
52 | 52 | <severity>MAJOR</severity>
|
53 | 53 | <cardinality>SINGLE</cardinality>
|
54 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 54 | + <description><![CDATA[ <p><code><tag name="variable"></code> should have @output='false'</p> ]]></description> |
55 | 55 | </rule>
|
56 | 56 | <rule>
|
57 | 57 | <key>QUERYPARAM_REQ</key>
|
58 | 58 | <name>SetSql() statement should use .addParam().</name>
|
59 | 59 | <severity>BLOCKER</severity>
|
60 | 60 | <cardinality>SINGLE</cardinality>
|
61 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 61 | + <description><![CDATA[ <p>setSql() statement should use .addParam() instead of #'s name="variable"</p> ]]></description> |
62 | 62 | <tag>security</tag>
|
63 | 63 | </rule>
|
64 | 64 | <rule>
|
65 | 65 | <key>CFQUERYPARAM_REQ</key>
|
66 |
| - <name>cfquery should use</name> |
| 66 | + <name>cfquery should use cfqueryparam</name> |
67 | 67 | <severity>BLOCKER</severity>
|
68 | 68 | <cardinality>SINGLE</cardinality>
|
69 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 69 | + <description><![CDATA[ <p><code><tag></code> should use <code><cfqueryparam/></code> for variable 'variable'.</p> ]]></description> |
70 | 70 | <tag>security</tag>
|
71 | 71 | </rule>
|
72 | 72 | <rule>
|
|
82 | 82 | <name>Variable is not declared with a var statement.</name>
|
83 | 83 | <severity>CRITICAL</severity>
|
84 | 84 | <cardinality>SINGLE</cardinality>
|
85 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 85 | + <description><![CDATA[ <p>Variable is not declared with a var statement.</p> ]]></description> |
86 | 86 | <tag>bug</tag>
|
87 | 87 | </rule>
|
88 | 88 | <rule>
|
89 | 89 | <key>AVOID_USING_CFDUMP_TAG</key>
|
90 | 90 | <name>Avoid use of cfdump tags.</name>
|
91 | 91 | <severity>MAJOR</severity>
|
92 | 92 | <cardinality>SINGLE</cardinality>
|
93 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 93 | + <description><![CDATA[ <p>Avoid leaving <code><cfdump></code> tags in committed code. Debug information should be omitted from release code</p> ]]></description> |
94 | 94 | <tag>security</tag>
|
95 | 95 | </rule>
|
96 | 96 | <rule>
|
97 | 97 | <key>AVOID_USING_CFEXECUTE_TAG</key>
|
98 | 98 | <name>Avoid use of cfexecute tags.</name>
|
99 | 99 | <severity>CRITICAL</severity>
|
100 | 100 | <cardinality>SINGLE</cardinality>
|
101 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 101 | + <description><![CDATA[ <p>Avoid leaving <code><cfexecute></code> tags in committed code. CFexecute can be used as an attack vector and is slow.</p> ]]></description> |
102 | 102 | <tag>security</tag>
|
103 | 103 | </rule>
|
104 | 104 | <rule>
|
|
107 | 107 | <severity>MAJOR</severity>
|
108 | 108 | <cardinality>SINGLE</cardinality>
|
109 | 109 | <description><![CDATA[ <p>Avoid using the <code>isDate()</code> built-in function. It is too permissive. Use <code>isValid()</code> instead.</p> ]]></description>
|
110 |
| - <tag>security</tag> |
| 110 | + <tag>bug</tag> |
111 | 111 | </rule>
|
112 | 112 | <rule>
|
113 | 113 | <key>AVOID_USING_CFABORT_TAG</key>
|
114 | 114 | <name>Avoid use of cfabort tags.</name>
|
115 | 115 | <severity>CRITICAL</severity>
|
116 | 116 | <cardinality>SINGLE</cardinality>
|
117 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 117 | + <description><![CDATA[ <p>Avoid leaving <code><cfabort></code> tags in committed code.</p> ]]></description> |
118 | 118 | <tag>bug</tag>
|
119 | 119 | </rule>
|
120 | 120 | <rule>
|
121 | 121 | <key>AVOID_USING_ABORT</key>
|
122 | 122 | <name>Avoid use of abort statements.</name>
|
123 | 123 | <severity>CRITICAL</severity>
|
124 | 124 | <cardinality>SINGLE</cardinality>
|
125 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 125 | + <description><![CDATA[ <p>Avoid using abort in production code.</p> ]]></description> |
126 | 126 | <tag>bug</tag>
|
127 | 127 | </rule>
|
128 | 128 | <rule>
|
129 | 129 | <key>AVOID_USING_CFINSERT_TAG</key>
|
130 | 130 | <name>Avoid use of cfinsert tags.</name>
|
131 | 131 | <severity>CRITICAL</severity>
|
132 | 132 | <cardinality>SINGLE</cardinality>
|
133 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 133 | + <description><![CDATA[ <p>Avoid using <code><cfinsert></code> tags. Use cfquery and cfstoredproc instead.</p> ]]></description> |
134 | 134 | <tag>bug</tag>
|
135 | 135 | </rule>
|
136 | 136 | <rule>
|
|
146 | 146 | <name>Avoid use of cfupdate tags.</name>
|
147 | 147 | <severity>MAJOR</severity>
|
148 | 148 | <cardinality>SINGLE</cardinality>
|
149 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 149 | + <description><![CDATA[ <p>Avoid using <code><cfupdate></code> tags. Use cfquery and cfstoredproc instead.</p> ]]></description> |
150 | 150 | <tag>bug</tag>
|
151 | 151 | </rule>
|
152 | 152 | <rule>
|
153 | 153 | <key>AVOID_USING_CFINCLUDE_TAG</key>
|
154 | 154 | <name>Avoid use of cfinclude tags.</name>
|
155 | 155 | <severity>CRITICAL</severity>
|
156 | 156 | <cardinality>SINGLE</cardinality>
|
157 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 157 | + <description><![CDATA[ <p>Avoid using <code><cfinclude></code> tags. Use components instead.</p> ]]></description> |
158 | 158 |
|
159 | 159 | </rule>
|
160 | 160 | <rule>
|
|
183 | 183 | <name>Argument is missing a hint.</name>
|
184 | 184 | <severity>MINOR</severity>
|
185 | 185 | <cardinality>SINGLE</cardinality>
|
186 |
| - <description><![CDATA[ <p>Use JavaDoc style annotations on cfscript functions.</p> ]]></description> |
| 186 | + <description><![CDATA[ <p>Argument is missing a hint. Use javadoc style annotations on cfscript functions.</p> ]]></description> |
187 | 187 | </rule>
|
188 | 188 | <rule>
|
189 | 189 | <key>ARG_TYPE_MISSING</key>
|
190 | 190 | <name>Component is missing a type.</name>
|
191 | 191 | <severity>BLOCKER</severity>
|
192 | 192 | <cardinality>SINGLE</cardinality>
|
193 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 193 | + <description><![CDATA[ <p>Argument variable is missing a type.</p> ]]></description> |
194 | 194 | <tag>bug</tag>
|
195 | 195 | </rule>
|
196 | 196 | <rule>
|
|
206 | 206 | <name>Method is too long.</name>
|
207 | 207 | <severity>MAJOR</severity>
|
208 | 208 | <cardinality>SINGLE</cardinality>
|
209 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 209 | + <description><![CDATA[ <p>Function should be fewer than 100 lines.</p> ]]></description> |
210 | 210 | </rule>
|
211 | 211 | <rule>
|
212 | 212 | <key>EXCESSIVE_COMPONENT_LENGTH</key>
|
213 | 213 | <name>Component is too long.</name>
|
214 | 214 | <severity>MAJOR</severity>
|
215 | 215 | <cardinality>SINGLE</cardinality>
|
216 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 216 | + <description><![CDATA[ <p>Component should be fewer than 500 lines.</p> ]]></description> |
217 | 217 | </rule>
|
218 | 218 | <rule>
|
219 | 219 | <key>FUNCTION_TYPE_MISSING</key>
|
|
236 | 236 | <name>Function has too many arguments.</name>
|
237 | 237 | <severity>MAJOR</severity>
|
238 | 238 | <cardinality>SINGLE</cardinality>
|
239 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 239 | + <description><![CDATA[ <p>Function has too many arguments. Should be fewer than 10.</p> ]]></description> |
240 | 240 | </rule>
|
241 | 241 | <rule>
|
242 | 242 | <key>EXCESSIVE_FUNCTIONS</key>
|
243 | 243 | <name>Too many functions.</name>
|
244 |
| - <severity>MAJOR</severity> |
| 244 | + <severity>MINOR</severity> |
245 | 245 | <cardinality>SINGLE</cardinality>
|
246 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 246 | + <description><![CDATA[ <p>Component has too many functions. Should be fewer than 10.</p> ]]></description> |
247 | 247 | </rule>
|
248 | 248 | <rule>
|
249 | 249 | <key>FUNCTION_TOO_COMPLEX</key>
|
250 | 250 | <name>Function is too complex.</name>
|
251 | 251 | <severity>CRITICAL</severity>
|
252 | 252 | <cardinality>SINGLE</cardinality>
|
253 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 253 | + <description><![CDATA[ <p>Function is too complex. Consider breaking the function into smaller functions.</p> ]]></description> |
254 | 254 | </rule>
|
255 | 255 | <rule>
|
256 | 256 | <key>AVOID_USING_WRITEDUMP</key>
|
|
272 | 272 | <name>Avoid use of isdebugmode statements.</name>
|
273 | 273 | <severity>MINOR</severity>
|
274 | 274 | <cardinality>SINGLE</cardinality>
|
275 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 275 | + <description><![CDATA[ <p>Avoid using the IsDebugMode function in production code.</p> ]]></description> |
276 | 276 | </rule>
|
277 | 277 | <rule>
|
278 | 278 | <key>AVOID_USING_ARRAYNEW</key>
|
|
293 | 293 | <name>Checking boolean expression explicitly.</name>
|
294 | 294 | <severity>MAJOR</severity>
|
295 | 295 | <cardinality>SINGLE</cardinality>
|
296 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 296 | + <description><![CDATA[ <p>Explicit check of boolean expression is not needed.</p> ]]></description> |
297 | 297 | </rule>
|
298 | 298 | <rule>
|
299 | 299 | <key>VAR_INVALID_NAME</key>
|
300 | 300 | <name>Variable has invalid name.</name>
|
301 | 301 | <severity>CRITICAL</severity>
|
302 | 302 | <cardinality>SINGLE</cardinality>
|
303 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 303 | + <description><![CDATA[ <p>Variable is not a valid name. Please use camelCase or underscores.</p> ]]></description> |
304 | 304 | <tag>bug</tag>
|
305 | 305 | </rule>
|
306 | 306 | <rule>
|
307 | 307 | <key>VAR_ALLCAPS_NAME</key>
|
308 | 308 | <name>Variable name is allcaps.</name>
|
309 | 309 | <severity>MINOR</severity>
|
310 | 310 | <cardinality>SINGLE</cardinality>
|
311 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 311 | + <description><![CDATA[ <p>Variable should not be upper case.</p> ]]></description> |
312 | 312 | </rule>
|
313 | 313 | <rule>
|
314 | 314 | <key>VAR_TOO_SHORT</key>
|
|
343 | 343 | <name>Variable name has prefix or postfix.</name>
|
344 | 344 | <severity>MINOR</severity>
|
345 | 345 | <cardinality>SINGLE</cardinality>
|
346 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 346 | + <description><![CDATA[ <p>Variable has prefix or postfix variable and could be named better.</p> ]]></description> |
347 | 347 | </rule>
|
348 | 348 | <rule>
|
349 | 349 | <key>ARGUMENT_MISSING_NAME</key>
|
|
357 | 357 | <name>Argument has invalid name.</name>
|
358 | 358 | <severity>CRITICAL</severity>
|
359 | 359 | <cardinality>SINGLE</cardinality>
|
360 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 360 | + <description><![CDATA[ <p>Please use camelCase or underscores.</p> ]]></description> |
361 | 361 | <tag>bug</tag>
|
362 | 362 | </rule>
|
363 | 363 | <rule>
|
|
493 | 493 | <name>Component name looks temporary.</name>
|
494 | 494 | <severity>MAJOR</severity>
|
495 | 495 | <cardinality>SINGLE</cardinality>
|
496 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 496 | + <description><![CDATA[ <p>Component name component could be named better.</p> ]]></description> |
497 | 497 | </rule>
|
498 | 498 | <rule>
|
499 | 499 | <key>COMPONENT_HAS_PREFIX_OR_POSTFIX</key>
|
500 | 500 | <name>Component name has prefix or postfix.</name>
|
501 | 501 | <severity>MINOR</severity>
|
502 | 502 | <cardinality>SINGLE</cardinality>
|
503 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 503 | + <description><![CDATA[ <p>Component name has prefix or postfix and could be named better.</p> ]]></description> |
504 | 504 | </rule>
|
505 | 505 | <rule>
|
506 | 506 | <key>FILE_SHOULD_START_WITH_LOWERCASE</key>
|
507 | 507 | <name>CFM File starts with upper case.</name>
|
508 | 508 | <severity>MINOR</severity>
|
509 | 509 | <cardinality>SINGLE</cardinality>
|
510 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 510 | + <description><![CDATA[ <p>Filename starts with an upper case letter. Only components (.cfc files) should start with an upper case letter.</p> ]]></description> |
511 | 511 | </rule>
|
512 | 512 | <rule>
|
513 | 513 | <key>AVOID_USING_CREATEOBJECT</key>
|
|
543 | 543 | <name>Using comparison where assignment was probably meant.</name>
|
544 | 544 | <severity>CRITICAL</severity>
|
545 | 545 | <cardinality>SINGLE</cardinality>
|
546 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 546 | + <description><![CDATA[ <p>Comparing instead of Assigning</p> ]]></description> |
547 | 547 | <tag>bug</tag>
|
548 | 548 | </rule>
|
549 | 549 | <rule>
|
|
559 | 559 | <name>Variable scope name is allcaps.</name>
|
560 | 560 | <severity>MINOR</severity>
|
561 | 561 | <cardinality>SINGLE</cardinality>
|
562 |
| - <description><![CDATA[ <p></p> ]]></description> |
| 562 | + <description><![CDATA[ <p>Scope variable should not be upper case.</p> ]]></description> |
563 | 563 | </rule>
|
564 | 564 | <rule>
|
565 | 565 | <key>AVOID_USING_CFSETTING_DEBUG</key>
|
|
569 | 569 | <description><![CDATA[ <p></p> ]]></description>
|
570 | 570 | <tag>security</tag>
|
571 | 571 | </rule>
|
572 |
| - <rule> |
573 |
| - <key>MISSING_SEMI</key> |
574 |
| - <name>No semicolon!</name> |
575 |
| - <severity>CRITICAL</severity> |
576 |
| - <cardinality>SINGLE</cardinality> |
577 |
| - <description><![CDATA[ <p></p> ]]></description> |
578 |
| - <tag>bug</tag> |
579 |
| - </rule> |
580 | 572 | <rule>
|
581 | 573 | <key>UNQUOTED_STRUCT_KEY</key>
|
582 | 574 | <name>Unquoted struct key</name>
|
|
650 | 642 | <description><![CDATA[ <p></p> ]]></description>
|
651 | 643 | <tag>bug</tag>
|
652 | 644 | </rule>
|
| 645 | + <rule> |
| 646 | + <key>STRUCT_ARRAY_NOTATION</key> |
| 647 | + <name>Use array notation</name> |
| 648 | + <severity>MAJOR</severity> |
| 649 | + <cardinality>SINGLE</cardinality> |
| 650 | + <description><![CDATA[ <p>Unquoted struct key variable is not case-sensitive. Using array notation is recommended.</p> ]]></description> |
| 651 | + </rule> |
653 | 652 | </rules>
|
0 commit comments