From 82e5d0998200321a2fb30bf6ddb69f32b80aca20 Mon Sep 17 00:00:00 2001 From: Tejas Bubane Date: Fri, 18 Feb 2022 01:25:57 +0530 Subject: [PATCH] [Fix #10410] Improve help string for `--fail-level` CLI option Closes #10410 --- changelog/change_improve_fail_level_help_string.md | 1 + lib/rubocop/options.rb | 10 ++++++++-- spec/rubocop/options_spec.rb | 10 ++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 changelog/change_improve_fail_level_help_string.md diff --git a/changelog/change_improve_fail_level_help_string.md b/changelog/change_improve_fail_level_help_string.md new file mode 100644 index 00000000000..6717c244dd8 --- /dev/null +++ b/changelog/change_improve_fail_level_help_string.md @@ -0,0 +1 @@ +* [#10410](https://github.com/rubocop/rubocop/issues/10410): Improve help string for `--fail-level` CLI option. ([@tejasbubane][]) diff --git a/lib/rubocop/options.rb b/lib/rubocop/options.rb index cd05c7da3bd..281a5f70956 100644 --- a/lib/rubocop/options.rb +++ b/lib/rubocop/options.rb @@ -467,8 +467,14 @@ module OptionsHelp 'This option applies to the previously', 'specified --format, or the default format', 'if no format is specified.'], - fail_level: ['Minimum severity (A/I/R/C/W/E/F) for exit', - 'with error code.'], + fail_level: ['Minimum severity for exit with error code.', + '[A] autocorrect', + '[I] info', + '[R] refactor', + '[C] convention', + '[W] warning', + '[E] error', + '[F] fatal'], display_time: 'Display elapsed time in seconds.', display_only_failed: ['Only output offense messages. Omit passing', 'cops. Only valid for --format junit.'], diff --git a/spec/rubocop/options_spec.rb b/spec/rubocop/options_spec.rb index 910967f99a0..8290c1be1f9 100644 --- a/spec/rubocop/options_spec.rb +++ b/spec/rubocop/options_spec.rb @@ -64,8 +64,14 @@ def abs(path) reports. This is useful for editor integration. -P, --[no-]parallel Use available CPUs to execute inspection in parallel. Default is true. - --fail-level SEVERITY Minimum severity (A/I/R/C/W/E/F) for exit - with error code. + --fail-level SEVERITY Minimum severity for exit with error code. + [A] autocorrect + [I] info + [R] refactor + [C] convention + [W] warning + [E] error + [F] fatal Caching: -C, --cache FLAG Use result caching (FLAG=true) or don't