Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark
Style/IdenticalConditionalBranches
as unsafe auto-correction
Follow up to #9982 (comment) This PR marks `Style/IdenticalConditionalBranches` as unsafe auto-correction. `Style/IdenticalConditionalBranches` cop is marked unsafe auto-correction as the order of method calls must be guaranteed in the following case: ```ruby if method_that_modifies_global_state # 1 method_that_relies_on_global_state # 2 foo # 3 else method_that_relies_on_global_state # 2 bar # 3 end ``` In such a case, auto-correction may change the invocation order.
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/change_mark_unsafe_autocorrect_for_style_identical_conditional_branches.mdb
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 @@ | ||
* [#9985](https://github.com/rubocop/rubocop/pull/9985): Mark `Style/IdenticalConditionalBranches` as unsafe auto-correction. ([@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