-
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
Doesn't seem to be checking missing_var on cfscript cfcs #186
Comments
It should work with pure cfscript components. I added a test to confirm that. It's working. Can you share the code snippet that doesn't flag the missing var? |
Hey @ryaneberly, thanks for the quick reply! After you confirmed that CFLint should infact be checking varscoping in CFSCRIPT CFCs, I set out to try to figure out why mine was being left out. I've built a test file that reflects the breaky parts of the CFC in my codebase. After I found this, I thought, "well there's probably a better way for us to do that!", but nonetheless, having a method like poorlyWrittenFunction() in a CFC file seems to prevent CFLint from reporting any issues on anything else in that file. It's as if CFLint becomes distracted by the awful, and forgets why it's even there. In my testing, it seems that all components of poorlyWrittenFunction() are required to reproduce the bug, hopefully this is helpful in diagnosing, should you decide to fix it. Thanks! Aaron
|
Ok, there was a bug. The Jericho Parser sees a <img/> and assumes it has to parse CFML. I changed the code to parse cfscript if it finds a "component" ahead of that first "element" (or there are no elements at all -- which was supported by the old code). |
Thanks for the great sample |
Awesome, thanks @ryaneberly! |
I've been using CFLint (running the jar directly) and am able to verify that it will find missing var's in standard .cfc files. However, when testing on a .cfc file that is entirely cfscript, it doesn't seem to find my missing var's.
Here's the command I'm running (in case it helps):
java -jar CFLint-0.7.3-all.jar -file /[webroot]/cfc/functions.cfc | grep -i 'missing_var'
I don't see anything in the docs that leads me to believe that cfscript isn't supported. Any thoughts on what I'm missing here?
CFLint version: 0.7.3
The text was updated successfully, but these errors were encountered: