-
Notifications
You must be signed in to change notification settings - Fork 48
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
Changes from all commits
10881a7
759f434
2d34a78
b5630b8
33ba911
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -922,6 +922,10 @@ Layout/SpaceAroundOperators: | |
SupportedStylesForExponentOperator: | ||
- space | ||
- no_space | ||
EnforcedStyleForRationalLiterals: no_space | ||
SupportedStylesForRationalLiterals: | ||
- space | ||
- no_space | ||
Layout/SpaceBeforeBlockBraces: | ||
Description: Checks that the left block brace has or doesn't have space before it. | ||
Enabled: true | ||
|
@@ -1418,6 +1422,11 @@ Lint/InterpolationCheck: | |
SafeAutoCorrect: false | ||
VersionAdded: '0.50' | ||
VersionChanged: '1.40' | ||
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' | ||
Comment on lines
+1425
to
+1429
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/LambdaWithoutLiteralBlock: | ||
Description: Checks uses of lambda without a literal block. | ||
Enabled: false | ||
|
@@ -1426,6 +1435,10 @@ Lint/LiteralAsCondition: | |
Description: Checks of literals used in conditions. | ||
Enabled: true | ||
VersionAdded: '0.51' | ||
Lint/LiteralAssignmentInCondition: | ||
Description: Checks for literal assignments in the conditions. | ||
Enabled: true | ||
VersionAdded: '1.58' | ||
Comment on lines
+1438
to
+1441
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
Lint/LiteralInInterpolation: | ||
Description: Checks for literals used in interpolation. | ||
Enabled: true | ||
|
@@ -2344,7 +2357,19 @@ Style/ArgumentsForwarding: | |
Enabled: false | ||
AllowOnlyRestArgument: true | ||
UseAnonymousForwarding: true | ||
RedundantRestArgumentNames: | ||
- args | ||
- arguments | ||
RedundantKeywordRestArgumentNames: | ||
- kwargs | ||
- options | ||
- opts | ||
RedundantBlockArgumentNames: | ||
- blk | ||
- block | ||
- proc | ||
VersionAdded: '1.1' | ||
VersionChanged: '1.58' | ||
Style/ArrayCoercion: | ||
Description: Use Array() instead of explicit Array check or [*var], when dealing | ||
with a variable you want to treat as an Array, but you're not certain it's an | ||
|
@@ -2353,6 +2378,12 @@ Style/ArrayCoercion: | |
Safe: false | ||
Enabled: false | ||
VersionAdded: '0.88' | ||
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 | ||
Comment on lines
+2381
to
+2386
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
Style/ArrayIntersect: | ||
Description: Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`. | ||
Enabled: true | ||
|
@@ -3710,7 +3741,7 @@ Style/RedundantFetchBlock: | |
Description: Use `fetch(key, value)` instead of `fetch(key) { value }` when value | ||
has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` | ||
or is a constant. | ||
Reference: https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code | ||
Reference: https://github.com/fastruby/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code | ||
Enabled: false | ||
Safe: false | ||
SafeForConstants: false | ||
|
@@ -3885,7 +3916,7 @@ Style/SafeNavigation: | |
MaxChainLength: 2 | ||
Style/Sample: | ||
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`. | ||
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code | ||
Reference: https://github.com/fastruby/fast-ruby#arrayshufflefirst-vs-arraysample-code | ||
Enabled: true | ||
VersionAdded: '0.30' | ||
Style/SelectByRegexp: | ||
|
@@ -3943,6 +3974,7 @@ Style/SingleLineBlockParams: | |
- elem | ||
Style/SingleLineDoEndBlock: | ||
Description: Checks for single-line `do`...`end` blocks. | ||
StyleGuide: "#single-line-do-end-block" | ||
Enabled: true | ||
VersionAdded: '1.57' | ||
Style/SingleLineMethods: | ||
|
@@ -4058,6 +4090,11 @@ Style/StructInheritance: | |
SafeAutoCorrect: false | ||
VersionAdded: '0.29' | ||
VersionChanged: '1.20' | ||
Style/SuperWithArgsParentheses: | ||
Description: Use parentheses for `super` with arguments. | ||
StyleGuide: "#super-with-args" | ||
Enabled: true | ||
VersionAdded: '1.58' | ||
Comment on lines
+4093
to
+4097
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seemed like a good idea, given |
||
Style/SwapValues: | ||
Description: Enforces the use of shorthand-style swapping of 2 variables. | ||
StyleGuide: "#values-swapping" | ||
|
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 extractedv1.xx
variables.