Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show extension cop versions when using
--verbose-version
option
## Summary This PR shows extension cop versions when using `--verbose-version` option. Before: ```console % rubocop -V 0.93.1 (using Parser 2.7.2.0, rubocop-ast 0.8.0, running on ruby 2.7.2 x86_64-darwin19) ``` After: ```console % rubocop -V 0.93.1 (using Parser 2.7.2.0, rubocop-ast 0.8.0, running on ruby 2.7.2 x86_64-darwin19) - rubocop-performance 1.8.1 - rubocop-rspec 1.43.2 ``` This information is not shown in `rubocop -v` as it is needed in the bug report, first. ## More Information It shows extension cop versions named rubocop-feature (e.g. rubocop-performance, rubocop-rspec). Extention names separated by two or more, such as rubocop-feature-foo, are not supported by this PR. First of all, this is aimed at supporting the extension cop managed by RuboCop Headquarters. This feature searches for version constant in two ways: - RuboCop core version style (e.g. `RuboCop::Performance::Version::STRING`) - `bundle gem` version style (e.g. `RuboCop::Rake::VERSION`) This enriches the information when reporting bugs from users. It was inspired by RSpec. Thank you. ```console % bundle exec rspec --version RSpec 3.9 - rspec-core 3.9.3 - rspec-expectations 3.9.2 - rspec-mocks 3.9.1 - rspec-support 3.9.3 ```
- Loading branch information
Showing
7 changed files
with
108 additions
and
15 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
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
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
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