-
-
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.
[Fix #12574] Handle unrecognized style better in --auto-gen-config
When there are supported styles in the cop configuration, auto-generated configuration should get an EnforcedStyle entry if the inspected code base conforms, not to the currently select style, but to one of the other styles, and follows that style in all places. If the code base contains code the conforms to different styles, we should get an Exclude entry instead. The same goes for code that doesn't conform to any of the cop's supported styles. This last case is where we had a bug. We didn't mark the style as unrecognized, which is why we got an EnforcedStyle instead of an Exclude.
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 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 @@ | ||
* [#12574](https://github.com/rubocop/rubocop/issues/12574): Fix bug for unrecognized style in --auto-gen-config. ([@jonas054][]) |
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