-
Notifications
You must be signed in to change notification settings - Fork 195
Unified brace_linter #1092
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
Unified brace_linter #1092
Conversation
- deprecate closed_curly_linter - add brace_linter to defaults instead of closed_curly_linter - add breaking change to NEWS
|
Check the new lints -- new logic is missing something, e.g. |
|
Great work on the whole chain! |
That was actually a true positive, complaining about the closing |
|
Filing the |
* delete else_same_line_linter and merge it into brace_linter * delete function_brace_linter and merge it into brace_linter (#1094) * delete function_brace_linter and merge it into brace_linter * delete if_else_match_braces_linter and merge it into brace_linter (#1095) * delete if_else_match_braces_linter and merge it into brace_linter * deprecate open_curly_linter and merge it into brace_linter (#1096) * deprecate open_curly_linter - remove open_curly_linter from defaults - refactor to XPath based approach - no longer lint trailing whitespace (there's a separate linter for that) * merge paren_brace_linter into brace_linter (#1097) * deprecate paren_brace_linter - remove paren_brace_linter from defaults - extend to else{ and repeat{ * `code` Co-authored-by: Michael Chirico <[email protected]> * add explicit test for different behaviour compared to closed_curly_linter Co-authored-by: Michael Chirico <[email protected]> Co-authored-by: Michael Chirico <[email protected]> Co-authored-by: Michael Chirico <[email protected]> Co-authored-by: Michael Chirico <[email protected]>
|
Thanks for the quick review. Ready to merge now, as the chain is completely merged. |
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)
Fixes #1041
I'll do a chain of PRs into this main one to make review easier.
This first step contains the closed_curly_linter, which I ported to XPath while at it.
Tests were largely copied (one new one because the XML parse data for
a({...})anda(function() {...})differs) fromclosed_curly_linter()but made a little more readable.