-
Notifications
You must be signed in to change notification settings - Fork 142
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
Move us closer to the Shopify style guide #1066
Conversation
Oh and just for fun: adopting the style guide without making any changes gives us |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't review every file 😛but I have checked locally with the robocop 👏
Well, it actually predates it significantly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There's a few places it broke the indentations
- Please disable
Style/PerlBackrefs
- There's other cop I'd have a lot to say about, but if it makes it easier for the occasional Shopify contributor, then fine.
You could also mark the literal that gets fed to this method as non-frozen: |
This was a good suggestion, but I decided against it because it turns out the test suite is also peppered with |
As for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
I needed a change of pace so decided to do some style gardening :)
Our rubocop config has drifted far from the style guide, this PR doesn't bring us all the way up to date but does knock out the quick wins. Our rubocop config is much smaller after this, and the
_todo
file is completely removed. There are still a few exclusions in the rubocop config I will work on in follow ups.There only only a couple of substantive changes:
JSON.load
toJSON.parse
(here)OutputChunk
6fce3c0That last one is required because write out string literals at the end of tasks, and these are now frozen:
shipit-engine/app/models/shipit/task.rb
Lines 274 to 277 in 7c5affc
Is there a cleaner fix?