Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support pattern matching for
Style/IdenticalConditionalBranches
cop
This PR supports Ruby 2.7's pattern matching syntax for `Style/IdenticalConditionalBranches` cop. This `Style/IdenticalConditionalBranches` cop is detecting for `if` and` case`. Therefore, I think about detecting `case-match` with the cop instead of a new cop. It may also be suitable for the cop's role of detecting duplicated conditional branches.
- Loading branch information
Showing
3 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/new_support_pattern_matching_for_style_identical_conditional_branches.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#9855](https://github.com/rubocop/rubocop/pull/9855): Support Ruby 2.7's pattern matching for `Style/IdenticalConditionalBranches` cop. ([@koic][]) |
This file contains 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
This file contains 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