-
Notifications
You must be signed in to change notification settings - Fork 185
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
assignment_linter() gains operator= argument to allow, e.g. '=' assignments #2711
Conversation
Thanks @IndrajeetPatil! I'd also like to get feedback from @AshesITR in this case since he commented a lot on the earlier PRs & this will be released soon afterwards. |
Yeah, I think it'll be good to remove it from the defaults. |
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.
Good stuff, just a few kinks that could be ironed out.
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.
Basically GTG. Nice work, thanks!
Is there advice in the style guide that motivates this change? If so, I'd be fine with shipping another breaking change related to this linter, given that we do impact analysis first. |
Ah, I always assumed there was such advice, but there's not. I think there should be: But you're right we shouldn't introduce a breaking change at this late hour if it doesn't contradict the style guide. On the other hand, {lintr}'s own defaults already do discourage So at a minimum, we have some internal contradiction in our defaults. I filed #2717 as a follow-up -- we should at least resolve the conflict in the next release regardless of if there's movement in the upstream style guide report. |
Supersedes #2698 and #2521. h/t again @J-Moravec for getting the ball rolling here.
Closes #2441.
This also un-couples the linted operator from the
allow_trailing
behavior; lints generated by the operator used are now independent of lints generated by line-trailing assignment operators:Having
<<-
allowed by default is back-compatible, but does strike me as odd -- should we also plan to remove this from the defaults?