-
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
False error reporting for arrow functions #738
Comments
@tcm151 cfparser added some support for lambda functions a little while ago I wonder whats tripping it up here? cfparser/cfparser@b6475f7 try using parens around your arguments ? |
Also temp = metadata.filter(m => m.DATA_TYPE != "P" && m.DATA_VALUE != ""); appears to work fine for me ? what version of cflint are you using ? try using this one and let me know if it fixes your issue https://github.com/cfmleditor/CFLint/releases/tag/1.5.5-SNAPSHOT |
Didn't know there was a snapshot, thanks for that! I've been using 1.5 |
@tcm151 no guarantees, just wanted to rule out an old version of the parser. The parser can get a bit crossed up with syntax depending on lots of other factors. Often as soon as you isolate the syntax it does fine, but embedded in a file with all kinds of other code can sometimes cause a problem. So if you're able to isolate it and reproduce the problem, that would help with some diagnosis ( but sometimes not an easy fix ) |
It's coming from a pretty small file, only 25-30 lines so I don't think there is too much affecting it that way. I'll give the snapshot a try and see if that resolves the issue |
@ghedwards still no luck with the snapshot version, I've tried as many combinations of arrow functions syntax as I can think of |
I'm just going to exclude that rule for the meantime since it's not a major blocker for what I need it for |
Arrow functions have been included in ACF since 2018, however CFLint false shows a missing semi colon error when they are used.
Example:
shows error when using arrow function
doesn't show error when using the full chunky function syntax
The text was updated successfully, but these errors were encountered: