-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Renew RuboCop effort based on StandardRB #935
Conversation
Cool idea! |
YES, omg, @smoline, we've been trying to figure out how to merge all that amazing work for a while now. THANK YOU for taking on such a huge task and driving the investment in linting!!!!! |
I do think this should make it in to changelog developer notes. |
@maebeale, @h-m-m, @svileshina : we chatted a bit about this last night and i think i heard general agreement. But we also ran out of time so i'd love explicit approval about this general approach before merging. I also likely won't be around tuesday morning, so if you can give it some consideration and post any thoughts, that would be great. Could also be useful to look over a few of the follow up PRs listed under next steps above. We can review them fully over time, but they'll help paint a fuller picture of what the path towards full integration would look like. |
c02e1f5
to
92b346e
Compare
92b346e
to
268eaff
Compare
Discussed and approved in person. |
Why
Back in October, @smoline put in some great work introducing
rubocop
into our codebase.Sadly, we had to prioritize feature development and weren't able to complete and merge all that work.
This is the first of several PRs intended to revive that effort.
Since then, StandardRB has hit v1.0 and i think there's a lot to gain from basing our rules on theirs. Primarily, they've done a lot of work to weigh different alternative options and tried to standardize, which means we have less to think about!
That said, StandardRB is an inherently 'opinionated' tool and (not surprisingly 😏), i would like a little more flexibility than it allows.
As such, i'm proposing that we base our rules on StandardRB but retain the ability to customize on top of them.
What
In this PR:
.rubocop.yml
config with one that inherits from StandardRB, via thestandard
gem..rubocop_todo.yml
which encapsulates and excludes all existing violations. This allows us to enable linting of new code without having to first fix the whole codebase. It also sets up follow-on PRs to fix violations; see Next Steps below.See Next Steps for a list of follow-up PRs that customize the ruleset and incrementally address existing violations.
How
The integration with StandardRB is based on this evilmartians.com article.
The idea is to continue using
rubocop
executables instead ofstandard
but simply to base our rubocop config on theirs.Testing
Adds StandardRB-based rubocop validation to our CI builds.
Next Steps
.rubocop_todo.yml
. Some of them also customize or override Standard rules. Most build on the previous one and can be merged independently in the order listed below.# rubocop:todo
comments so they are more visible and likely to be addresses when we next touch related code.Outstanding Questions, Concerns and Other Notes
Would love to hear opinions about this approach of:
Meta
Huge shoutout to @smoline for laying the groundwork for all this. Sorry we couldn't merge your PRs as-is, but we're very much indebted to that foundation!
Pre-Merge Checklist