Skip to content
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

Rubocop 0.79 #437

Merged
merged 56 commits into from Feb 16, 2020
Merged

Rubocop 0.79 #437

merged 56 commits into from Feb 16, 2020

Conversation

hainesr
Copy link
Member

@hainesr hainesr commented Feb 9, 2020

Update to the current version of Rubocop and tackle the majority of the issues.

I've made some calls here and there - mainly with turning off some cops in the tests. Sometimes tests just need to be long/complex/etc and splitting them up doesn't make much sense.

There are some cops I haven't had time to really tackle yet (Style/FrozenStringLiteralComment, Style/MutableConstant for example) because fixing these will have some side effects that need thought, or serious re-working of the code.

I originally did this a few months ago, and it's taken a fair amount of effort to rebase/cherry-pick/rework it, so even though there are still some bits to finish up I think it's worth merging; it gets us most of the way and can be built upon from here.

@coveralls
Copy link

coveralls commented Feb 9, 2020

Coverage Status

Coverage increased (+0.09%) to 95.767% when pulling 87a63e0 on hainesr:rubocop-0.79 into 5da87ef on rubyzip:master.

Copy link
Member

@jdleesmiller jdleesmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on!

I am definitely OK with doing this gradually, and as you say this looks like a good start.

I have been through, and all looks good. Just a few comments. (And as usual I learned about some new ruby things, such as unpack1!)

lib/zip/file.rb Show resolved Hide resolved
test/file_test.rb Outdated Show resolved Hide resolved
test/file_test.rb Outdated Show resolved Hide resolved
.rubocop.yml Show resolved Hide resolved
Also rename .rubocop_rubyzip.yml to be consistent with Rubocop default
setup.
This fixes Style/InfiniteLoop as a side-effect.
Allow this in entry_test.rb so we can test <=>.
In the tests we can say "anything goes", but in the main body of the
code we should at least comment if we're not handling an exception
fully.
Use the `refute_nil` method for most of these.
Currently 2.4 is the earliest supported ruby version.
@hainesr
Copy link
Member Author

hainesr commented Feb 15, 2020

@jdleesmiller I've made the changes and rebased on top of current master. Just the one comment about open above to be resolved. What do you think?

Copy link
Member

@jdleesmiller jdleesmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

lib/zip/file.rb Show resolved Hide resolved
@jdleesmiller jdleesmiller merged commit 10685a7 into rubyzip:master Feb 16, 2020
jdleesmiller added a commit that referenced this pull request Feb 16, 2020
@hainesr hainesr deleted the rubocop-0.79 branch February 16, 2020 16:46
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants