-
Notifications
You must be signed in to change notification settings - Fork 26
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
Rubocop 1.30 #960
Conversation
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 |
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.
TODO found
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: Keywords, RequireColon. | ||
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE |
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.
FIXME found
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: Keywords, RequireColon. | ||
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE |
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.
HACK found
and got zero offenses. So I think this branch indeed fixes the HttpPositionalArguments false positives. |
I think the has_many missing inverse_of offences are pretty
straightforward: just add "inverse_of :target" to all the has_many
:comments and has_many :interests relationships throughout the code. Why
it doesn't infer that the "inverse_of" option is identical to the "as"
option, I don't know. But it's easy enough to be explicit.
…On Sun, May 29, 2022 at 1:40 PM Joseph D. Cohen ***@***.***> wrote:
1. As a test, I merged (locally) this branch into Fix
Rails/HttpPositionalArguments offenses #957
<#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.
—
Reply to this email directly, view it on GitHub
<#960 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYTNNKYOMJ7SESCMSO4HW3VMOTZ3ANCNFSM5XIMSDWQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks Jason. |
How do you mean? I show that production has a modified version of
db/schema.rb, but that Gemfile.lock is in sync with master.
…On Sun, May 29, 2022 at 1:46 PM Joseph D. Cohen ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#960 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYTNNKFKJ6TFX6SWPXB473VMOUQFANCNFSM5XIMSDWQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
# Conflicts: # Gemfile.lock Resolved using theirs (master)
I needed to do that after merging master into this branch
@JoeCohen This looks great, and i'm glad it clears up those HttpPositionalArguments offenses. |
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
Joe - if you can fix the ABC in IpStats#update_one_stat have at it! It really looks fine to me.
…r/mushroom-observer into joe-rubocop-1-30
Code Climate has analyzed commit edeb03b and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
I will merge this. |
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
, andrubocop_rails
gems to the latest versions, removing the now-uselessmry
gem;There is no manual test.