New features
- #13735: Add new
Lint/ArrayLiteralInRegexp
cop. (@dvandersluis) - #13507: Add new
Style/HashSlice
cop. (@lovro-bikic)
Bug fixes
- #13684: Fix a false positive for
Style/FrozenStringLiteralComment
when using the frozen string literal magic comment in Active Admin's arb files. (@koic) - #13372: Add
rubocop_cache
to the path given by--cache-root
when pruning cache. (@capncavedan) - #13257: Fix department disable/enable comments enabling the cop for the whole file even if that file is excluded by the cop. (@earlopain)
- #13704: Fix false positives for
Lint/OutOfRangeRegexpRef
when matching withmatch
using safe navigation. (@koic) - #13720: Fix false positives for
Style/BlockDelimiters
when using brace blocks as conditions underEnforcedStyle: semantic
. (@koic) - #13688: Fix false negative on
Style/RedundantLineContinuation
when the continuation is preceded by an interpolated string. (@dvandersluis) - #13677: Fix false negative on
Style/RedundantLineContinuation
when the continuation is followed by a percent array. (@dvandersluis) - #13692: Fix false positive in
Style/RedundantLineContinuation
when the ruby code ends with a commented continuation. (@dvandersluis) - #13675: Fix invalid autocorrect for
Style/ArrayFirstLast
when calling.[]
or&.[]
with 0 or -1. (@dvandersluis) - #13685: Fix syntax error introduced by
Lint/SafeNavigationChain
when adding safe navigation to an operator call inside a hash. (@dvandersluis) - #13725: Fix an incorrect autocorrect for
Style/IfUnlessModifier
when using omitted hash values in an assignment. (@elliottt) - #13667: Maintain precedence in autocorrect for
Style/SoleNestedConditional
. (@tejasbubane) - #13679: Fix false positive for
Style/RedundantLineContinuation
when calling methods with fully qualified constants. (@earlopain) - #13728: Fix a RuboCop error on provided glob pattern which matches directory. (@viralpraxis)
- #13693: Fix
Style/ConditionalAssignment
cop error onunless
withoutelse
andassign_inside_condition
enforced style. (@viralpraxis) - #13669: Fix
Style/FrozenStringLiteralComment
cop error on unnormalized magic comment andnever
enforced style. (@viralpraxis) - #13696: Update
Metrics/CollectionLiteralLength
to only register for[]
when called onSet
. (@dvandersluis)
Changes
- #13709: Add support for safe navigation to
Lint/FloatComparison
. (@dvandersluis) - #13711: Add support for safe navigation to
Layout/MultilineMethodCallBraceLayout
. (@dvandersluis) - #13712: Add support for safe navigation to
Layout/MultilineMethodArgumentLineBreaks
. (@dvandersluis) - #13714: Add support for safe navigation to
Security/CompoundHash
. (@dvandersluis) - #13674: Add support for safe navigation to
Style/BlockDelimiters
. (@dvandersluis) - #13673: Add support for safe navigation to
Style/CollectionMethods
. (@dvandersluis) - #13672: Add support for safe navigation to
Style/MapToSet
. (@dvandersluis) - #13671: Add support for safe navigation to
Style/MethodCallWithoutArgsParentheses
. (@dvandersluis) - #13701: Add support for safe navigation to
Lint/NumericOperationWithConstantResult
. (@dvandersluis) - #13700: Add support for safe navigation to
Lint/RedundantStringCoercion
. (@dvandersluis) - #13698: Add support for safe navigation to
Lint/UselessNumericOperation
. (@dvandersluis) - #13686: Add wildcard support to
--show-cops
. (@kyanagi) - #13724: Make
Style/RedundantParentheses
aware of parenthesized assignment. (@koic) - #13732: Update
Style/RedundantLineContinuation
to handle required continuations followingsuper
. (@dvandersluis)