-
Notifications
You must be signed in to change notification settings - Fork 22
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
Nested loop at the end of function fail on Don't make functions within a loop
#25
Comments
While I agree that your particular example seems to make a case in favour of adding this warning to the ignore list, doing so would also cause very legitimate reports to start slipping under the radar; such as in: funcs = (( ( j ) -> i + j ) for i in [0..10] ) I feel that it is rather the responsibility of |
I would like to revoke my previous assertion. Little did I realise the pervasiveness of this warning until I found that my generator had been confidingly inserting Btw, this warning currently comes in the form of So, instead of adding this warning to the |
Fixes #25 Please _do_ note that this will now also hide legitimate reports.
This
coffee
code fails on?:?: Don't make functions within a loop.
The fact that the for loop is last statement means, coffee wants to return its value. If the loop has another loop in it, there is anonymoous function inside the loop that "collets" the values to return. Transpiled
js
looks like this:Do you guys think, it would make sense to add
"Don't make functions within a loop."
toerrorsToSkip
inhint.coffee
?The text was updated successfully, but these errors were encountered: