-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNUSED_LOCAL_VARIABLE incompatible with cfquery #693
Comments
A more complete example: <cffunction name="f">
<cfquery>
<cfloop list="a,b,c" index="local.x">
#x#
</cfloop>
</cfquery>
</cffunction>
|
For comparison, the following passes: <cfset var x = 0>
<cfloop list="a,b,c" index="x"> |
To further simplify the example: <cffunction name="f">
<cfset var x = 0>
<cfquery datasource="#request.app_datasource#">
#x#
</cfquery>
</cffunction> It seems that using a variable in |
jaredbeck
changed the title
UNUSED_LOCAL_VARIABLE: False positive: cfloop index
UNUSED_LOCAL_VARIABLE incompatible with cfquery
Oct 2, 2020
This issue is very similar to #632. If it's helpful to you to combine them, @ryaneberly, please feel free to. |
Can confirm this happens when in script syntax as well. In this example, for( var header in requestHeaders ){
cfhttpparam( type = 'header', name = header.name, value = header.value );
} Also ocures when using
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EDIT: better example below
Possibly related to #657
The text was updated successfully, but these errors were encountered: