-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow autocorrect with display-only-fail-level-offenses
The `--display-only-fail-level-offenses` option uses `considered_failure?` to determine what to print. The same method is used to determine the exit code of `rubocop`, so the two options should be entirely safe to use together. This change is useful when using rubocop as part of a pre-commit hook. When the hook fails becuase rubocop exited with a non-zero status, we can use `--display-only-fail-level-offenses` to avoid having the output cluttered up with non-blocking offenses.
- Loading branch information
Showing
3 changed files
with
5 additions
and
12 deletions.
There are no files selected for viewing
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 @@ | ||
* [#12535](https://github.com/rubocop/rubocop/pull/12535): Allow --autocorrect with --display-only-fail-level-offenses. ([@naveg][]) |
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