-
Notifications
You must be signed in to change notification settings - Fork 115
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
Update the versions of all linters #153
Conversation
7455548
to
81190ea
Compare
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 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 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 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.
👏
max_allowed_nesting: 2 | ||
ignore_iterators: [] | ||
NilCheck: | ||
enabled: false |
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.
Any chance we can enable this one? We see a lot of nil checks 🤔
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.
It makes sense in theory, but the rule is just too aggressive. For example, in ActAsApiRequest
it was complaining about this line: request_content_type&.match?(/json/)
Basically it will complain if we use safe navigation or try
.
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.
Okay, yeah.. I really don't like the try
, but I think the &.
is not that bad and we should allow it. Thanks for the clarification.
.reek.yml
Outdated
accept: [] | ||
UncommunicativeModuleName: | ||
enabled: true | ||
exclude: ['V1'] |
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.
Can we have this one as a regex? Something like, for example /V\d/
? Not sure on how it's going to resolve the conflict with the reject list, tho.
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.
Fixed 👍
81190ea
to
9d8d476
Compare
This PR updates the versions of the following linters:
rubocop
reek
rails_best_practices
brakeman
Of those updates, the major change is
reek
, which we are moving from version 4 to 5. There are some important changes torubocop
as well.Changes to
reek
:4.7.2
to5.3.1
.reek.yml
Changes to
rubocop
:0.49.1
to0.65.0
Layout/ClassStructure
(disabled by default).Style/ReturnNil
(disabled by default).Style/ExpandPathArguments
(enabled by default).Rails
cops (disabled by default). Of all the Rails cops, the following cops are different from the default configuration:Rails/FilePath
is disabledRails/SaveBang
is enabled