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 1.30 #960

Merged
merged 13 commits into from
May 30, 2022
Merged

Rubocop 1.30 #960

merged 13 commits into from
May 30, 2022

Conversation

JoeCohen
Copy link
Member

This PR updates RuboCop and associated gems and files. The purpose is to have the latest RuboCop bug fixes (as well as new cops).
The PR updates:

  • rubocop, rubocop_performance, and rubocop_rails gems to the latest versions, removing the now-useless mry gem;
  • Codeclimate configuration to use a newer version of RuboCop;
  • RuboCop configuration to disable new cops by default, simplify directions for updating RuboCop;
  • RuboCop todo file (unfortunately adding hundreds of new offenses).

There is no manual test.

It was only for pre-release versions of RuboCop, which is now at 1.30.
And I didn't use it much (or maybe at all)./
RuboCop was frozen; Hard to upgrade otherwise
`>=` for other cops  unneeded since RuboCop itself will be upgraded
rubocop, rubocop-performance, rubocop-rails
Use 1-23-0, which is Codeclimate's highest available RuboCop channel.
While not quite as good as 1-30, it's better than a pre-relase version.
They were so complicated that they deterred updates.
This is needed in order to prevent CodeClimate from flagging new offenses on unchanged lines.
Unfortunately, it suppresses thousands of existing offenses.
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Keywords, RequireColon.
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO found

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Keywords, RequireColon.
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
Copy link
Contributor

Choose a reason for hiding this comment

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

FIXME found

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Keywords, RequireColon.
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
Copy link
Contributor

Choose a reason for hiding this comment

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

HACK found

@coveralls
Copy link
Collaborator

coveralls commented May 29, 2022

Coverage Status

Coverage remained the same at 93.065% when pulling edeb03b on joe-rubocop-1-30 into a227af0 on master.

@JoeCohen
Copy link
Member Author

  1. As a test, I merged (locally) this branch into Fix Rails/HttpPositionalArguments offenses Fix Rails/HttpPositionalArguments offenses #957, ran
rubocop -f html -o rubocop.html --only Rails/HttpPositionalArguments

and got zero offenses. So I think this branch indeed fixes the HttpPositionalArguments false positives.
2. I'll get to work on the CodeClimate issues in a few minutes.

@pellaea
Copy link
Member

pellaea commented May 29, 2022 via email

@JoeCohen
Copy link
Member Author

Thanks Jason.
But now there are conflicts with master (in Gemfile.lock). I should fix them before dealing with Codeclimate. They should be easy.
But taking a break now.

@pellaea
Copy link
Member

pellaea commented May 29, 2022 via email

# Conflicts:
#	Gemfile.lock

Resolved using theirs (master)
I needed to do that after merging master into this branch
@nimmolo
Copy link
Contributor

nimmolo commented May 29, 2022

@JoeCohen This looks great, and i'm glad it clears up those HttpPositionalArguments offenses.
Shall I knock out those two codeclimate issues?

@JoeCohen
Copy link
Member Author

Thanks @nimmolo. I'll take care of the CodeClimate stuff now. (I got diverted by some website issues.)

Run `bundle update` to re-update the rubocop gems.
I needed to do this after merging master into this branch.
Fixes Codeclimate issue
nimmolo and others added 2 commits May 29, 2022 18:12
Joe - if you can fix the ABC in IpStats#update_one_stat have at it!
It really looks fine to me.
@codeclimate
Copy link
Contributor

codeclimate bot commented May 30, 2022

Code Climate has analyzed commit edeb03b and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Bug Risk 3

View more on Code Climate.

@JoeCohen
Copy link
Member Author

I will merge this.
GitHub says "codeclimate — 3 issues to fix".
But when I click the Details link, it says "All good!No new issues were found."
I think the 3 issues are Fixme (a Codeclimate plugin) issues which I've told Codeclimate that I won't fix.

@JoeCohen JoeCohen merged commit 2910501 into master May 30, 2022
@JoeCohen JoeCohen deleted the joe-rubocop-1-30 branch May 30, 2022 03:31
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.

4 participants