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
Enable Rubocop - the sequel #1441
Conversation
fc315ee
to
50bbe05
Compare
50bbe05
to
0fa2e75
Compare
Theoretically, Rubocop autocorrection shouldn't lead to any substantive changes in the meaning of your code, but it can make mistakes from time to time. I have a high level of confidence though that we're safe: the tests pass, and I have manually read through the changes to check for anything evident (although this is obviously challenging given the length of the diff). |
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.
a735bc7
to
b304823
Compare
b304823
to
0097549
Compare
ERB in Ruby 2.3 doesn't seem to be frozen string literal compatible - at least under certain cases. I observed a number of test failures in GitHub Actions when working with templates, generating an error like this: ``` (erb):1:in `concat': can't modify frozen String (RuntimeError) ``` You can see an example [here][1]. It seems prudent just to ignore this since (a) people are unlikely to use Ruby 2.3, (b) we are set to drop support for it and (c) it's even more unlikely that people use Ruby 2.3 *and* frozen string literals. [1]: https://github.com/octokit/octokit.rb/runs/6792298625?check_suite_focus=true
0097549
to
fa00889
Compare
This PR is a follow up to #1432, again trying to enable Rubocop in CI and autocorrect what we can, whilst keeping the gem actually working😅 ❤️
I decided to start again with a fresh PR because the original PR had a very ugly history - lots of embarrassing fiddling around getting the right
TargetRubyVersion
for Rubocop! - and I didn't want to destroy it as there were some useful comments in there.It's worth noting that, to support linting compatible with Ruby 2.3 (which is the current version we actually support, despite what the gemspec claims!), we have to downgrade Rubocop to an earlier version.