Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplicate extension cop versions when
rubocop -V
Follow #9349 (comment). This PR fixes duplicate extension cop versions when `rubocop -V`. The following is an example: ```yaml # ext.yml require: - rubocop-rspec # .rubocop.yml inherit_from: ext.yml require: - rubocop-performance - rubocop-rspec ## Before If there are duplicate requires, extension cop display will also be duplicated. Duplicate requires will be displayed in duplicate. ```console % rubocop -V 1.8.0 (using Parser 3.0.0.0, rubocop-ast 1.4.0, running on ruby 2.7.2 x86_64-darwin19) - rubocop-performance 1.9.2 - rubocop-rspec 2.0.0 - rubocop-rspec 2.0.0 ``` ## After Even if there are duplicate requires, they will only be displayed once per extension cop. ```console % rubocop -V 1.8.0 (using Parser 3.0.0.0, rubocop-ast 1.4.0, running on ruby 2.7.2 x86_64-darwin19) - rubocop-performance 1.9.2 - rubocop-rspec 2.0.0 ```
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/fix_duplicate_ext_cop_versions_when_using_rubocop_verbose_version.md
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 @@ | ||
* [#9356](https://github.com/rubocop-hq/rubocop/pull/9356): Fix duplicate extension cop versions when using `rubocop -V`. ([@koic][]) |
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