rubocop / rubocop-rspec

Code style checking for RSpec files.
https://docs.rubocop.org/rubocop-rspec
MIT License
792 stars 272 forks source link

Consider if any cops should be renamed #1887

Closed bquorning closed 1 month ago

bquorning commented 1 month ago

Now that the next major release draws closer, I think it’s time to consider whether all of our cops are properly named.

Previous to their v1.0.0, RuboCop did a massive cop rename (see rubocop/rubocop#6983, rubocop/rubocop#7077, rubocop/rubocop#7468) and I wonder if we ever truly went over our cop names. Just one example:

These four cops all check metadata, but three are named FooMetadata and one is MetadataFoo. Should one or three (or zero) be renamed?

bquorning commented 1 month ago

cc @rubocop/rubocop-rspec

pirj commented 1 month ago

https://github.com/rubocop/rubocop/pull/10725 adds some formal rules for cop naming. Even though it’s been a while, I don’t think even our new cops follow those cop naming guidelines.

I’m just thinking if this is worth the hassle for our users to rename cops in their project .rubocop.yml files? And those poor souls who dared extracting .rubocop.yml into a shared repository, while updating versions out of sync.

It is the time for this rename. But I have doubts if it is worth it. But I admin I may have a bias against renaming just because I got used to the existing naming, or I feel that the effort may be more significant than we envision it.

bquorning commented 1 month ago

Gotcha, you are correct that renaming might cause more pain than joy among our users. But perhaps we should copy that section from development.adoc into our repository and think a little more about cop names before adding them? 😅

pirj commented 1 month ago

That makes sense. I also commit to extracting the guideline part in hope to merge it