-
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 function_brace_linter #987
Conversation
We were not totally sure what to do with a case like we see in lintr/R/package_hooks_linter.R Lines 82 to 85 in b91dc57
In the end we decided to enforce that having braces. But we might skip linting this type of usage optionally. |
https://style.tidyverse.org/syntax.html#inline-statements It's written explicitly for Also note the implicit mention of a leading { in https://style.tidyverse.org/functions.html#long-lines-1 cc @jimhester |
So, do we make it a default? |
Yes. Any thoughts on the edge case-y example in the above comment? #987 (comment) |
I'd lint it. It's not super easy to see at first glance that there is no closing parenthesis on the function definition line. |
A new modification of brace_lintr was added in lintr 3.0.0; unfortunately this is not configurable without entirely disabling the linter which does other desirable things entirely. See r-lib/lintr#987 (introduces new linter) r-lib/lintr#1092 (combines linters unconfigurably)
A new modification of brace_lintr was added in lintr 3.0.0; unfortunately this is not configurable without entirely disabling the linter which does other desirable things entirely. See r-lib/lintr#987 (introduces new linter) r-lib/lintr#1092 (combines linters unconfigurably)
Part of #962
Shall we mark this one as default? I don't see it called out specifically in the style guide.