New features
- #9396: Add new
Style/IfWithBooleanLiteralBranches
cop. (@koic) - #9402: Add new
Lint/TripleQuotes
cop. (@dvandersluis) - #7827: Add pre-commit hook. (@jdufresne, @adithyabsk)
- #7452: Support
IgnoredMethods
option forStyle/FormatStringToken
. (@koic) - #9340: Added
info
Severity level to allow offenses to be listed but not return a non-zero error code. (@dvandersluis) - #9353: Add new
Lint/SymbolConversion
cop. (@dvandersluis) - #9363: Add new cop
Lint/OrAssignmentToConstant
. (@uplus) - #9326: Add new
Lint/NumberedParameterAssignment
cop. (@koic)
Bug fixes
- #9366: Fix an incorrect auto-correct for
Style/SoleNestedConditional
when using method arguments without parentheses for outer condition. (@koic) - #9372: Fix an error for
Style/IfInsideElse
when nestedif
branch code is empty. (@koic) - #9374: Fix autocorrection for
Layout/LineLength
when the first argument to a send node is a overly long hash pair. (@dvandersluis) - #9387: Fix incorrect auto-correct for
Style/NilComparison
when using!x.nil?
andEnforcedStyle: comparison
. (@koic) - #9411: Fix false negatives for
Style/EvalWithLocation
forKernel.eval
and when given improper arguments. (@dvandersluis) - #7766: Fix
Naming/RescuedExceptionsVariableName
autocorrection when the rescue body returns the exception variable. (@asterite) - #7766: Fix
Naming/RescuedExceptionsVariableName
autocorrection to not change variables if the exception variable has been reassigned. (@dvandersluis) - #9389: Fix an infinite loop error for
IncludeSemanticChanges: false
ofStyle/NonNilCheck
withEnforcedStyle: comparison
ofStyle/NilComparison
. (@koic) - #9384: Fix a suggestion message when not auto-correctable. (@koic)
- #9424: Fix an incorrect auto-correct for
Style/ClassMethodsDefinitions
when defining class methods withclass << self
and there is no blank line between method definition and attribute accessor. (@koic) - #9370: Fix an incorrect auto-correct for
Style/SoleNestedConditional
when using nestedunless
modifier multiple conditional. (@koic) - #9406: Fix rubocop_todo link injection when YAML doc start sigil exists. (@dduugg)
- #9229: Fix errors being reported with
rubocop -V
with an invalid config. (@dvandersluis) - #9425: Fix error in
Layout/ClassStructure
when initializer comes after private attribute macro. (@tejasbubane)
Changes
- #9415: Change
Layout/ClassStructure
to detect inline modifiers. (@AndreiEres) - #9380: Mark
Style/FloatDivision
as unsafe. (@koic) - #9345: Make
Style/AsciiComments
allow copyright notice by default. (@koic) - #9399: Added
AllowedCops
configuration toStyle/DisableCopsWithinSourceCodeDirective
. (@dvandersluis) - #9327: Change
Layout/EmptyLineAfterMagicComment
to accept top-levelshareable_constant_values
directive. (@tejasbubane) - #7902: Change
Lint/NumberConversion
to detect symbol form of conversion methods. (@tejasbubane)