-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use an opinionated set of rules for Rubocop #722
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
base: main
Are you sure you want to change the base?
Conversation
Most projects that thoughtbot is working on currently did not start here. The "Use standard" recommendation comes from a time that that wasn't true. There are a few reasons not to use Standard in existing projects: - A large project does not already use Standard and retrofitting would be costly - Need or want Rubocop rules other than Standard's opinionated set
We also added reasoning as a sub-bullet to the "rule". We may do another change though to move a broader discussion/reasoning to an adjunct document (beyond just linking to a pull request or issue). |
Some reasoning behind why I would vote to remove the recommendation of using Standard
My strongest point from the items above is that Standard makes it unnecessarily difficult and risky to use common Rubocop cops that fall outside their preferences which center on styling and layout. And to clarify, the style guides and conventions enforced by Standard are ones I could certainly get used to and even often agree with. |
Here is some history on this: 6d86958 The config is still here https://github.com/thoughtbot/guides/blob/main/ruby/.rubocop.yml (or was restored, I'm not sure), though it may have fallen out of maintenance or be reduced. That being said, I'm not sure about the arguments about existing code being a factor here are really applicable? One of the overarching guidelines in the guide is "Don't rewrite existing code to follow this guide." |
Ah, it was added back here 9ac4a38 |
I had restored it in #623, because we used the shared configuration feature of Hound on Administrate (and probably others, I don't recall) and we couldn't move quite so fast on that project (removing it caused hundreds of comments on everyone's PRs, it was unpleasant). We don't use it any more, although I'm yet to tidy up the final bits of linting to remove it entirely. That said, it's not been used in a while now, because we did switch to Standard. |
Most projects that thoughtbot is working on currently did not start here. The "Use standard" recommendation comes from a time that that wasn't true.
There are a few reasons not to use Standard in existing projects: