Repository navigation
Unified brace_linter - #1092
Merged
Merged
Unified brace_linter#1092
Conversation
- deprecate closed_curly_linter - add brace_linter to defaults instead of closed_curly_linter - add breaking change to NEWS
Collaborator
|
Check the new lints -- new logic is missing something, e.g. |
Collaborator
|
Great work on the whole chain! |
Collaborator
Author
That was actually a true positive, complaining about the closing |
Collaborator
Author
|
Filing the |
MichaelChirico
previously approved these changes
Apr 26, 2022
* 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]>
Collaborator
Author
|
Thanks for the quick review. Ready to merge now, as the chain is completely merged. |
MichaelChirico
approved these changes
Apr 26, 2022
richfitz
added a commit
to mrc-ide/outpack-r
that referenced
this pull request
Jul 27, 2022
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)
richfitz
added a commit
to mrc-ide/outpack-r
that referenced
this pull request
Jul 27, 2022
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.