Skip to content
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

Script ignore syntax fails in mixed cfscript/tag code #285

Closed
TheRealAgentK opened this issue Jun 7, 2017 · 5 comments
Closed

Script ignore syntax fails in mixed cfscript/tag code #285

TheRealAgentK opened this issue Jun 7, 2017 · 5 comments
Labels

Comments

@TheRealAgentK
Copy link
Collaborator

Tag CFC, inside a function:

    <cfloop query="siteSelect">
        <cfscript>
            variables.siteDetailList[siteID] = {"siteName"=siteName, "siteID"=siteID, "siteCode"=siteCode, "extension"=extension, "isLocalSite"=isLocalSite}; // cflint ignore:MISSING_VAR
        </cfscript>
    </cfloop>

The above ignore syntax fails - I feel it should work though.

In the code below the -block gets ignored correctly, but that's only a good solution in this case because it's a single-line -block

<cfloop query="siteSelect">
        <!--- @CFLintIgnore MISSING_VAR --->
        <cfscript>
            variables.siteDetailList[siteID] = {"siteName"=siteName, "siteID"=siteID, "siteCode"=siteCode, "extension"=extension, "isLocalSite"=isLocalSite};
        </cfscript>
    </cfloop>
@TheRealAgentK
Copy link
Collaborator Author

This is potentially related to #284

TheRealAgentK added a commit to TheRealAgentK/CFLint that referenced this issue Jun 7, 2017
TheRealAgentK added a commit that referenced this issue Jun 7, 2017
denuno added a commit that referenced this issue Jun 11, 2017
@denuno
Copy link
Collaborator

denuno commented Jun 11, 2017

I don't know if it will fix #284 or not, but this fixes the failing tests for this bug at least. 😄

@TheRealAgentK
Copy link
Collaborator Author

Thx - will give a try later today and report back.

@ryaneberly
Copy link
Contributor

Looks good at a glance. Thanks @denuno

@TheRealAgentK
Copy link
Collaborator Author

TheRealAgentK commented Jun 11, 2017

I had to port over the changeset to master to be able to test it (because of the issue I logged in #293), but in master it works fine and it solves the testcase as well as the actual real code.

It's not a fix for the more general/different issue in #284 though :)

TheRealAgentK pushed a commit to TheRealAgentK/CFLint that referenced this issue Jun 12, 2017
TheRealAgentK added a commit to TheRealAgentK/CFLint that referenced this issue Jun 12, 2017
TheRealAgentK added a commit that referenced this issue Jun 12, 2017
Cherry-picked and cleaned up @denuno's fix for #285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants