Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect plugin version when displaing rubocop -V #59

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

koic
Copy link
Member

@koic koic commented Feb 16, 2025

This commit fixes incorrect plugin version when displaing rubocop -V.

Before

The RuboCop core version is displayed incorrectly for rubocop-rake:

$ bundle exec rubocop -V
1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23]
  - rubocop-rake 1.72.1

After

The correct rubocop-rake version is displayed:

$ bundle exec rubocop -V
1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23]
  - rubocop-rake 0.7.0

This commit fixes incorrect plugin version when displaing `rubocop -V`.

## Before

The RuboCop core version is displayed incorrectly for `rubocop-rake`:

```console
$ bundle exec rubocop -V
1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23]
  - rubocop-rake 1.72.1
```

## After

The correct `rubocop-rake` version is displayed:

```console
$ bundle exec rubocop -V
1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23]
  - rubocop-rake 0.7.0
```
@koic koic force-pushed the fix_incorrect_plugin_version branch from 8ec0d75 to d429b81 Compare February 16, 2025 10:02
@koic koic merged commit 60d0f3b into rubocop:master Feb 16, 2025
8 checks passed
@koic koic deleted the fix_incorrect_plugin_version branch February 16, 2025 10:08
koic added a commit to rubocop/rubocop that referenced this pull request Feb 16, 2025
When created with `bundle gem`, `version.rb` initially uses `VERSION`.
Using `Version::STRING` as an example could lead to mistakes like the following:
rubocop/rubocop-rake#59

While it differs slightly from the actual `rubocop-performance`,
the example is updated to prioritize preventing such mistakes over strict synchronization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant