CFLint
CFLint copied to clipboard
UNUSED_LOCAL_VARIABLE false positive with var used in hashes
Unused variable on line 3
<cfcomponent displayname="myComponent">
<cffunction name="getData">
<cfset var testVar = 123>
<cfsavecontent variable = "sql_query">
<cfoutput>
SELECT #testVar#
</cfoutput>
</cfsavecontent>
</cffunction>
</cfcomponent>
related: https://github.com/cflint/CFLint/issues/464
if cfoutput contains any text, before, or after #testVar#, bug is reported
SyntaxError: Line1:10 no viable alternative at input '#testVar#asd'