Skip to content

Conversation

r7kamura
Copy link
Contributor

@r7kamura r7kamura commented May 8, 2023

Recreated from the following pull request:


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

If you have modified an existing cop's configuration options:

  • Set VersionChanged: "<<next>>" in config/default.yml.

@r7kamura r7kamura force-pushed the association-style branch from 94721af to 168c94f Compare May 13, 2023 23:59
@pirj pirj requested review from Darhazer and ydah May 14, 2023 08:56
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!
I've applied some cosmetic clean-up.

@pirj pirj force-pushed the association-style branch from d53315f to c539352 Compare May 14, 2023 09:28
@pirj
Copy link
Member

pirj commented May 14, 2023

lib/rubocop/cop/factory_bot/association_style.rb:174:25: C: InternalAffairs/UndefinedConfig: NonImplicitAssociationMethodNames is not defined in the configuration for FactoryBot/AssociationStyle in config/default.yml.
            (cop_config['NonImplicitAssociationMethodNames'] || [])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Locally 🧐

$ rubocop -v
v1.50.2

Updated to the latest 1.51.0, but still the same. It seems to be a rubocop bug to me.
Green on ci, so no problem.

PS most probably caused by rubocop-rspec's config somehow being preferred over rubocop-factory_bot's one, as witnessed by such messages:

/Users/pirj/.rvm/gems/ruby-3.1.0@rubocop-factory_bot/gems/rubocop-rspec-2.20.0/config/default.yml: FactoryBot/FactoryNameStyle has the wrong namespace - should be RSpec/FactoryBot

@pirj pirj force-pushed the association-style branch from d8e13fb to de7368f Compare May 15, 2023 06:48
@pirj pirj force-pushed the association-style branch from de7368f to cc4fc5b Compare May 15, 2023 07:00
Copy link
Member

@ydah ydah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@pirj
Copy link
Member

pirj commented May 15, 2023

@ydah Are you ok with this?
We can merge and release everything we have stacked up in a minor version, as it's the last PR remaining.

Copy link
Member

@ydah ydah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@pirj pirj merged commit 6054f30 into rubocop:master May 15, 2023
@pirj
Copy link
Member

pirj commented May 15, 2023

Thank you, @r7kamura ! :combo: 1️⃣ 2️⃣ 3️⃣ 🥇

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.

3 participants