New features
- #11110: Add new
Style/RedundantEach
cop. (@koic) - #10255: Add simple autocorrect for
Style/GuardClause
. (@FnControlOption) - #11126: Have
Lint/RedundantRequireStatement
markset
as a redundant require in Ruby 3.2+. (@drenmi) - #11001: Add option to raise cop errors
--raise-cop-error
. (@wildmaples) - #10987: Opt-in cop compatibility in redundant directives. (@tdeo)
Bug fixes
- #11125: Fix an error for
Layout/SpaceInsideHashLiteralBraces
when using method argument that both key and value are hash literals. (@koic) - #11132: Fix clobbering error on
Lint/EmptyConditionalBody
. (@r7kamura) - #11117: Fix a false positive for
Style/BlockDelimiters
when specifyingEnforcedStyle: semantic
and using a single line block with {} followed by a safe navigation method call. (@koic) - #11120: Fix an incorrect autocorrect for
Lint/RedundantRequireStatement
when using redundantrequire
with modifier form. (@koic)
Changes
- #11131: Check newline in empty reference bracket on
Layout/SpaceInsideReferenceBrackets
. (@r7kamura) - #11045: Update the
Style/ModuleFunction
documentation to suggestclass << self
as an alternative. (@rdeckard) - #11006: Allow multiple
elsif
forStyle/IfWithBooleanLiteralBranches
. (@koic) - #11113: Report the count of files in the Worst and the Offense Count formatters. (@hosamaly)