You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<cfset StructKeyExists(quickInfoData, 'companyName') AND len(#quickInfoData['companyName']#) gt 0>
<cfset StructKeyExists(quickInfoData, 'companyName') AND len(#quickInfoData['companyName']#) gt 0>
<cfset StructKeyExists(quickInfoData, 'companyName') AND len(#quickInfoData['companyName']#) gt 0>
and the resulting XML will contain:
<issueseverity="WARNING"id="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"message="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"category="CFLint"abbrev="GL">
<locationfile="C:\Inbox\cflint-test\.\regularDesign.cfm"fileName="regularDesign.cfm"function=""column="71"line="2"message="Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values."variable="companyName">
<Expression><![CDATA['companyName']]></Expression>
</location>
</issue>
<issueseverity="WARNING"id="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"message="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"category="CFLint"abbrev="GL">
<locationfile="C:\Inbox\cflint-test\.\regularDesign.cfm"fileName="regularDesign.cfm"function=""column="33"line="3"message="Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values."variable="companyName">
<Expression><![CDATA['companyName']]></Expression>
</location>
</issue>
<issueseverity="WARNING"id="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"message="GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN"category="CFLint"abbrev="GL">
<locationfile="C:\Inbox\cflint-test\.\regularDesign.cfm"fileName="regularDesign.cfm"function=""column="71"line="3"message="Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values."variable="companyName">
<Expression><![CDATA['companyName']]></Expression>
</location>
</issue>
Even though regularDesign.cfm contains only 1 line and doesn't mention companyName at all. The issue appears clearly because CFLint interprets the <cfinclude> and treats regularDesign.cfm as if it actually includedregularDesignHeader.cfm.
The text was updated successfully, but these errors were encountered:
This fix actually dropped the number of reported CFQUERYPARAM_REQ instances in one of my test runs from 21 to 8 (cfc with included cfm files) - looked properly into it and tracked each instance and I can confirm that the new (and way better) behaviour is working fine.
This requires the following 2 files to show:
reqularDesign.cfm
regularDesignHeader.cfm
and the resulting XML will contain:
Even though
regularDesign.cfm
contains only 1 line and doesn't mentioncompanyName
at all. The issue appears clearly because CFLint interprets the<cfinclude>
and treatsregularDesign.cfm
as if it actually includedregularDesignHeader.cfm
.The text was updated successfully, but these errors were encountered: