Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update auto-gen-config's comment re auto-correct for `SafeAutoCorrect…
…: false` This PR is enhancement: #10384 The auto-gen-config output will say "Cop supports --auto-correct". However, Cop with `SafeAutoCorrect: false` outputs the same as follows: ```yaml # This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: ``` We'll want to execute the following commands when we see it. ``` bundle exec rubocop --auto-correct foo.rb ``` However, it is not automatically corrected. ``` Offenses: foo.rb:1:1: C: [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment. [2, 1, 3].sort.first ^ 1 file inspected, 5 offenses detected, 5 more offenses can be corrected with `rubocop -A` ``` So, we should suggest --auto-correct-all for `SafeAutoCorrect: false` Cop as well.
- Loading branch information
Showing
4 changed files
with
24 additions
and
20 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/change_update_autogen_config_output_for_safe_auto_correct_false.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 @@ | ||
* [#10673](https://github.com/rubocop/rubocop/pull/10673): Update auto-gen-config's comment re auto-correct for `SafeAutoCorrect: false`. ([@ydah][]) |
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
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