Skip to content

Commit

Permalink
Move SafeAutoCorrect: false to correct cop config
Browse files Browse the repository at this point in the history
00ec9cb added autocorrect for
Lint/AssignmentInCondition, but marked Layout/AssignmentIndentation as
unsafe for autocorrection.
  • Loading branch information
eugeneius authored and bbatsov committed Feb 6, 2023
1 parent b09bbe1 commit fb8ce01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#11542](https://github.com/rubocop/rubocop/pull/11542): Mark `Layout/AssignmentIndentation` as safe and `Lint/AssignmentInCondition` as unsafe for autocorrection. ([@eugeneius][])
5 changes: 3 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,8 @@ Layout/AssignmentIndentation:
Checks the indentation of the first line of the
right-hand-side of a multi-line assignment.
Enabled: true
SafeAutoCorrect: false
VersionAdded: '0.49'
VersionChanged: '1.40'
VersionChanged: '<<next>>'
# By default the indentation width from `Layout/IndentationWidth` is used,
# but it can be overridden by setting this parameter.
IndentationWidth: ~
Expand Down Expand Up @@ -1573,7 +1572,9 @@ Lint/AssignmentInCondition:
Description: "Don't use assignment in conditions."
StyleGuide: '#safe-assignment-in-condition'
Enabled: true
SafeAutoCorrect: false
VersionAdded: '0.9'
VersionChanged: '<<next>>'
AllowSafeAssignment: true

Lint/BigDecimalNew:
Expand Down

0 comments on commit fb8ce01

Please sign in to comment.