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

Add rubocop-rspec_rails to suggested extensions and extension doc #12813

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

ydah
Copy link
Member

@ydah ydah commented Apr 1, 2024

This PR adds rubocop-rspec_rails to the SuggestExtensions list and extension doc.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@ydah ydah marked this pull request as draft April 1, 2024 04:46
This PR adds [rubocop-rspec_rails](https://github.com/rubocop/rubocop-rspec_rails) to the `SuggestExtensions` list and extension doc.
@ydah ydah marked this pull request as ready for review April 1, 2024 06:38
@koic koic merged commit 9a533ec into rubocop:master Apr 1, 2024
34 checks passed
@ydah ydah deleted the add-rubocop-rspec_rails branch April 1, 2024 15:12
@aprescott
Copy link

This appears to have resulted in the following suggestion message:

The following RuboCop extension libraries are installed but not loaded in config:
  * rubocop-rspec_rails

I assume this is related to rubocop/rubocop-rspec#1830 which extracted RSpec Rails cops to their own gem.

From reading #9156 and #9151 (comment) I would have thought this suggestion message wouldn't appear? rubocop-rspec_rails is indeed a (transitive) dependency for the app generating above the suggestion, and #9156 seems to suggest that in this case no such message should appear:

    rubocop-rspec (2.29.1)
      rubocop (~> 1.40)
      rubocop-capybara (~> 2.17)
      rubocop-factory_bot (~> 2.22)
      rubocop-rspec_rails (~> 2.28)
    rubocop-rspec_rails (2.28.2)
      rubocop (~> 1.40)

I can of course fix the suggestion message, but I thought I'd mention it in case this is a sign of some other bug. The presence of the suggestion message implies there's missing config, which I don't think is the case, and addressing the extra suggestion message noise feels like unnecessary work given that there's no actual change happening yet.

@aprescott
Copy link

Maybe also worth calling out: rubocop-rspec's 2.28.0 changelog indicates the extraction is intended to be invisible:

the change will be invisible to users until then

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.

None yet

3 participants