-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
I'm trying to ignore some issues, but unable to get it quite right
<cfcomponent>
<cffunction name="init">
<cfscript>
my = structnew(); // cflint ignore:MISSING_VAR
my.somekey = "";
</cfscript>
</cffunction>
</cfcomponent>
this results in
Message code:MISSING_VAR
File:C:\progetti\tesisquare\cflint_src\CFLint\tesitest\4\cflintTest3.cfc
Column:3
Line:4
Message:Variable my is not declared with a var statement.
Variable:'my' in function: init
Expression:my
but if I remove the my.somekey = ""; line, it will correctly report 0 errors.
The CFML comment annotation seems to be working properly:
<cfcomponent displayname="cflintTest">
<cffunction name="init" output="false">
<!--- @CFLintIgnore MISSING_VAR --->
<cfset my = structnew()>
</cffunction>
</cfcomponent>
Am I missing something?
Reactions are currently unavailable