Skip to content

Commit

Permalink
Update auto-gen-config's auto-correction comments
Browse files Browse the repository at this point in the history
This is a follow-up to 2ca25cd,
following a suggestion from bbatsov in the code review.
  • Loading branch information
maxjacobson committed Feb 13, 2022
1 parent c0136af commit 7143006
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 54 deletions.
1 change: 1 addition & 0 deletions changelog/change_auto_correct_message.md
@@ -0,0 +1 @@
* [#10414](https://github.com/rubocop/rubocop/pull/10414): Update auto-gen-config's auto-correction comments to be more clear. ([@maxjacobson][])
4 changes: 2 additions & 2 deletions lib/rubocop/formatter/disabled_config_formatter.rb
Expand Up @@ -124,9 +124,9 @@ def output_cop_comments(output_buffer, cfg, cop_name, offense_count)
default_cfg = default_config(cop_name)

if supports_safe_auto_correct?(cop_class, default_cfg)
output_buffer.puts '# Cop supports --auto-correct.'
output_buffer.puts '# This cop supports safe auto-correction (--auto-correct).'
elsif supports_unsafe_autocorrect?(cop_class, default_cfg)
output_buffer.puts '# Cop supports --auto-correct-all.'
output_buffer.puts '# This cop supports unsafe auto-correction (--auto-correct-all).'
end

return unless default_cfg
Expand Down

0 comments on commit 7143006

Please sign in to comment.