Skip to content

Commit

Permalink
Make rubocop -V display rubocop-rspec_rails version when using it
Browse files Browse the repository at this point in the history
This PR makes `rubocop -V` display rubocop-rspec_rails version when using it.
  • Loading branch information
ydah authored and bbatsov committed Apr 5, 2024
1 parent c111e2e commit 7c9c90f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#12817](https://github.com/rubocop/rubocop/pull/12817): Make `rubocop -V` display rubocop-rspec_rails version when using it. ([@ydah][])
2 changes: 1 addition & 1 deletion lib/rubocop/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Version

CANONICAL_FEATURE_NAMES = {
'Rspec' => 'RSpec', 'Graphql' => 'GraphQL', 'Md' => 'Markdown', 'Factory_bot' => 'FactoryBot',
'Thread_safety' => 'ThreadSafety'
'Thread_safety' => 'ThreadSafety', 'Rspec_rails' => 'RSpecRails'
}.freeze
EXTENSION_PATH_NAMES = {
'rubocop-md' => 'markdown', 'rubocop-factory_bot' => 'factory_bot'
Expand Down
4 changes: 3 additions & 1 deletion spec/rubocop/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ module FooBarBaz
rubocop-thread_safety
rubocop-capybara
rubocop-factory_bot
rubocop-rspec_rails
]
end

Expand All @@ -154,7 +155,8 @@ module FooBarBaz
/- rubocop-md \d+\.\d+\.\d+/,
/- rubocop-thread_safety \d+\.\d+\.\d+/,
/- rubocop-capybara \d+\.\d+\.\d+/,
/- rubocop-factory_bot \d+\.\d+\.\d+/
/- rubocop-factory_bot \d+\.\d+\.\d+/,
/- rubocop-rspec_rails \d+\.\d+\.\d+/
)
end
end
Expand Down

0 comments on commit 7c9c90f

Please sign in to comment.