Skip to content

Commit

Permalink
[Fix rubocop#10410] Improve help string for --fail-level CLI option
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasbubane committed Feb 17, 2022
1 parent 9f82e0f commit 82e5d09
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions 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][])
10 changes: 8 additions & 2 deletions lib/rubocop/options.rb
Expand Up @@ -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.'],
Expand Down
10 changes: 8 additions & 2 deletions spec/rubocop/options_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 82e5d09

Please sign in to comment.