Skip to content

merge paren_brace_linter into brace_linter #1097

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

Conversation

AshesITR
Copy link
Collaborator

Based against #1096, part of #1041

  • added lints for else{ and repeat{ while I was at it.

AshesITR and others added 2 commits April 25, 2022 20:46
 - remove paren_brace_linter from defaults
 - extend to else{ and repeat{
@@ -54,6 +55,21 @@ brace_linter <- function(allow_single_line = FALSE) {
)
))

xp_open_preceding <- "parent::expr/preceding-sibling::*[1][self::OP-RIGHT-PAREN or self::ELSE or self::REPEAT]"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@AshesITR AshesITR merged commit 12962c3 into feature/brace_linter-04-open_curly Apr 26, 2022
@AshesITR AshesITR deleted the feature/brace_linter-05-paren_brace branch April 26, 2022 07:12
MichaelChirico added a commit that referenced this pull request Apr 26, 2022
* 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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
AshesITR added a commit that referenced this pull request Apr 26, 2022
…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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
AshesITR added a commit that referenced this pull request Apr 26, 2022
* 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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
AshesITR added a commit that referenced this pull request Apr 26, 2022
* 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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
AshesITR added a commit that referenced this pull request 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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
MichaelChirico added a commit that referenced this pull request Apr 26, 2022
* create brace_linter based on XPath

 - deprecate closed_curly_linter
 - add brace_linter to defaults instead of closed_curly_linter
 - add breaking change to NEWS

* fix missing newline, update warning tests for semicolon_terminator_linter

* test for closed_curly_linter warning and make tests more silent

* remove c_style_braces for now

* document()

* allow ]}, update NEWS, incorporate feedback, fix lint

* delete else_same_line_linter and merge it into brace_linter (#1093)

* 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 <michaelchirico4@gmail.com>

* add explicit test for different behaviour compared to closed_curly_linter

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants