-
Notifications
You must be signed in to change notification settings - Fork 186
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
New return_linter
to enforce consistent return style
#1100
Comments
these are coming from Google having the opposite policy which is always to have explicit returns. in fact ExplicitReturnLinter is part of the extended suite (explicitly tabled because of this conflicting issue), so we can work the new option into the implementation there. |
This would be a great addition. Happy to help beta test. |
Seconding the ask here, would definitely find this linter useful! |
FYI @mjsteinbaugh and @givison there's a pending version in #2271 |
Thanks @MichaelChirico I'll check it out! |
Tidyverse expects implicit returns, so those should be the default.
Basically check that the last expr in all function definitions is a) never a return() or b) always a return().
Signature could maybe be
return_linter(use_implicit_returns = TRUE)
?The google linters introduced a bunch of these (
grep return\(lapply\( R/*.R
)The text was updated successfully, but these errors were encountered: