cflint / CFLint

Static code analysis for CFML (a linter)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cfloop execute startFunction method.

Vintic opened this issue · comments

Hi,
found that cfloop will execute startFunction method that can lead to errors for some rules.
Example:
Execute UNUSED_LOCAL_VARIABLE rule for:

<cfcomponent>
    <cffunction name="test" access="public" returnType="any" output="true">
        <cfset LOCAL.resultText="error">
        <cfset LOCAL.test="error">
        <cfloop query="arguments.qmetadata">
            <cfdump var="#test#">
        </cfloop>
    </cffunction>
</cfcomponent>

startFunction clear localVariables list variable