-
Notifications
You must be signed in to change notification settings - Fork 186
New unnecessary_lambda_linter #1541
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
Conversation
Looks like we'll need a new name -- 37 characters is too long 🫣 open to ideas |
How about |
makes sense to me, but i wonder if less-experienced users will be confused by this name |
IMO, given the kind of users that use linter or know what lints are, I think we can safely assume that they either know what this means or have the wherewithal to figure it out on their own. Plus, the doc should help as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should test multi-line functions and braces more thoroughly, especially the false negative case.
e.g.
lapply(1:10, function(x) { print(x) })
, which should lint
and
lapply(1:10, function(x) { print(x); x^2 })
, which should not lint.
Great idea! Indeed caught some false negatives. Let's leave them for follow-up (#1567) -- false negatives are more tolerable than false positives. |
Am I missing the positive braced test? Otherwise looks good so far |
that's marked for follow-up (#1567), is that a blocker to merge? |
Ah sorry I missed that issue. Is it referenced somewhere in the code or tests? |
There wasn't! Just added, it slipped through the cracks. |
@AshesITR need your approval now since the |
Part of #884. Closes #1531.
cc @Bisaloo for viz.
WIP: I will have to add extra logic for customizing the lint message. Filing now for early feedback.