-
Notifications
You must be signed in to change notification settings - Fork 47
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
Bump rubocop from 1.57.1 to 1.59.0 #593
Conversation
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.57.1 to 1.59.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v1.57.1...v1.59.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Rather than repeat `Gem::Version.new(...)` every time we want to check a version, we can extract a variable.
1756fd9
to
e4452a4
Compare
<% if rubocop_version >= v1_59 %> | ||
Lint/ItWithoutArgumentsInBlock: | ||
Enabled: true | ||
<% end %> |
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.
This takes the same approach as #582, and conditionally enables the cop based on the RuboCop version, allowing us to keep the minimum version the same.
Since I realized we'd end up repeating Gem::Version.new(...)
all over the place, I extracted v1.xx
variables.
Style/ArrayFirstLast: | ||
Description: Use `arr.first` and `arr.last` instead of `arr[0]` and `arr[-1]`. | ||
Reference: "#first-and-last" | ||
Enabled: false | ||
VersionAdded: '1.58' | ||
Safe: 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.
I kept this disabled, as I don't see it being worth it given how many false positives it would have.
e4452a4
to
33ba911
Compare
Lint/ItWithoutArgumentsInBlock: | ||
Description: Checks uses of `it` calls without arguments in block. | ||
Reference: https://bugs.ruby-lang.org/issues/18980 | ||
Enabled: true | ||
VersionAdded: '1.59' |
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.
This emulates an upcoming warning, so best to enable it and start addressing it early.
Lint/LiteralAssignmentInCondition: | ||
Description: Checks for literal assignments in the conditions. | ||
Enabled: true | ||
VersionAdded: '1.58' |
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.
This looks for things like
if x = true
or
if x = 123
which probably meant to use ==
instead. Technically, there's overlap with the rule we have that enforces surrounding ( )
for assignments in conditions, but it's still possible someone could make the mistake.
Style/SuperWithArgsParentheses: | ||
Description: Use parentheses for `super` with arguments. | ||
StyleGuide: "#super-with-args" | ||
Enabled: true | ||
VersionAdded: '1.58' |
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.
This seemed like a good idea, given super
and super()
do different things, although it may already be covered by us having parentheses enabled for method calls be default.
Bumps rubocop from 1.57.1 to 1.59.0.
Release notes
Sourced from rubocop's releases.
... (truncated)
Changelog
Sourced from rubocop's changelog.
... (truncated)
Commits
e5a164a
Cut 1.592912b6e
Update Changelog3bcc171
[Fix #12524] Fix a false positive forStyle/MethodCallWithArgsParentheses
0daa4aa
MakeStyle/MethodCallWithoutArgsParentheses
allow parenthesizedit
b240a09
MakeStyle/RedundantSelf
allowself.it
a0e1042
[Fix #12526] Fix incorrect rendering typosb1bcb31
[Fix #12444] Fix false positive forStyle/HashEachMethods
3b0360b
Add newLint/ItWithoutArgumentsInBlock
cop4e9cfcc
Merge pull request #12521 from koic/make_style_select_by_regexp_aware_of_safe...037c860
Merge pull request #12438 from koic/fix_a_false_positive_for_lint_literal_ass...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)