-
Notifications
You must be signed in to change notification settings - Fork 85
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
False positive: structure keys reported as variables without scope prefix #197
Comments
What version are you using? The latest in the dev branch, and release 0.7.3 don't flag for me. Full example
|
I'm seeing the same issue with the latest master version and the latest dev version that built successfully. When prepping parameters for
I.e.: "Variable claimId is not declared with a var statement. Use var or the local scope, or otherwise clarify the scope". Happy to provide more information about version used, etc. |
I didn't change any related code that I'm aware of, but it works for me on latest dev build See: If it's still broken for you (on dev branch), please provide a full source example. |
I can build off the latest dev branch, but when I run cflint on a folder, I get:
Is there something else that I should be doing? Sorry for the bother and thanks for the help. |
ok, sorry about that. I null proofed that line - though I couldn't duplicate it with
try again? |
Thanks Ryan! It builds and runs without issue now. I put together a repo with my failing example. It appears that it's actually related to a parsing error, which in turn generates the false positives. |
Ah a multiline quoted string. Interesting. Any idea with dialects and versions support that? |
I actually don't think it's the multiline string that's throwing it off. I think it's the boolean
When I set it to be simply true or false, there are no issues with the parsing/validation. And actually, I just tested including the pound signs for it, and that also works. That is, this syntax evaluates without issue: I don't want to make more work for you. Including the pound signs is an acceptable workaround for my issue. |
fixed in cfparser it will trickle out when the next cfparser and cflint releases happen. Until then you can build it yourself. Thanks for taking time to identify the issue. |
@ryaneberly Thanks for all the work you put into cflint! |
The following code code will trigger a false positive:
reporting that
testKey
is "not declared within a var statement", where it's a structure key and hence doesn't needvar
.The text was updated successfully, but these errors were encountered: