Skip to content

Commit

Permalink
Add new CFLint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Paluchowski authored and Michal Paluchowski committed Mar 1, 2017
1 parent 4a88ab4 commit 140d7d7
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
<repositoryKey>coldfusionsquid</repositoryKey>
<key>VAR_HAS_PREFIX_OR_POSTFIX</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>ARGUMENT_MISSING_NAME</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>ARGUMENT_INVALID_NAME</key>
Expand Down Expand Up @@ -311,6 +315,26 @@
<repositoryKey>coldfusionsquid</repositoryKey>
<key>UNQUOTED_STRUCT_KEY</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>SQL_SELECT_STAR</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>NEVER_USE_QUERY_IN_CFM</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>USE_DISPLAY_NAME</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>LOCAL_LITERAL_VALUE_USED_TOO_OFTEN</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN</key>
</rule>
<rule>
<repositoryKey>coldfusionsquid</repositoryKey>
<key>PARSE_NOTHING</key>
Expand Down
42 changes: 42 additions & 0 deletions src/main/resources/com/stepstone/sonar/plugin/coldfusion/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,13 @@
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p></p> ]]></description>
</rule>
<rule>
<key>ARGUMENT_MISSING_NAME</key>
<name>Argument is missing a name.</name>
<severity>MINOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p></p> ]]></description>
</rule>
<rule>
<key>ARGUMENT_INVALID_NAME</key>
<name>Argument has invalid name.</name>
Expand Down Expand Up @@ -569,6 +576,41 @@
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>Unquoted structure keys may or may not maintain their case on output. Quoting is recommended to make sure the case of the key is always the same.</p> ]]></description>
</rule>
<rule>
<key>SQL_SELECT_STAR</key>
<name>Star in SQL SELECT</name>
<severity>MAJOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>Avoid using <code>SELECT *</code> in a query.</p> ]]></description>
</rule>
<rule>
<key>NEVER_USE_QUERY_IN_CFM</key>
<name>Never use CFQUERY in .cfm files</name>
<severity>MINOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>Don't use <code>&lt;cfquery&gt;</code> in <code>.cfm</code> files. Database should not be coupled with view.</p> ]]></description>
</rule>
<rule>
<key>USE_DISPLAY_NAME</key>
<name>Use displayName instead of name</name>
<severity>MINOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>The component has a <code>name</code> attribute perhaps you meant to use <code>displayName</code>?</p> ]]></description>
</rule>
<rule>
<key>LOCAL_LITERAL_VALUE_USED_TOO_OFTEN</key>
<name>Local literal value used too often</name>
<severity>MINOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>The literal occurs several times in the same file. Consider giving it a name and not hard coding values.</p> ]]></description>
</rule>
<rule>
<key>GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN</key>
<name>Global literal value used too often</name>
<severity>MINOR</severity>
<cardinality>SINGLE</cardinality>
<description><![CDATA[ <p>The literal occurs several times in one or more files. Consider giving it a name and not hard coding values.</p> ]]></description>
</rule>
<rule>
<key>PARSE_NOTHING</key>
<name>PARSE NOTHING</name>
Expand Down

0 comments on commit 140d7d7

Please sign in to comment.