New features
- #5184: Add new multiline element line break cops. (@maxh)
- Add new cop
Rails/ActiveRecordOverride
that checks for overriding Active Record methods instead of using callbacks. (@elebow) - Add new cop
Rails/RedundantAllowNil
that checks for cases whenallow_blank
makesallow_nil
unnecessary in model validations. (@elebow) - Add new
Naming/RescuedExceptionsVariableName
cop. (@AdrienSldy)
Bug fixes
- #6761: Make
Naming/UncommunicativeMethodParamName
account for param names prefixed with underscores. (@thomthom) - #6855: Fix an exception in
Rails/RedundantReceiverInWithOptions
when the body is empty. (@ericsullivan) - #6856: Fix auto-correction for
Style/BlockComments
when the file is missing a trailing blank line. (@ericsullivan) - #6858: Fix an incorrect auto-correct for
Lint/ToJSON
when there are noto_json
arguments. (@koic) - #6865: Fix deactivated
StyleGuideBaseURL
forLayout/ClassStructure
. (@aeroastro) - #6868: Fix
Rails/LinkToBlank
auto-correct bug when using symbol for target. (@r7kamura) - #6869: Fix false positive for
Rails/LinkToBlank
when rel is a symbol value. (@r7kamura) - Add
IncludedMacros
param to default rubocop config forStyle/MethodCallWithArgsParentheses
. (@maxh) - #6785: Do not register an offense for
Rails/Present
orRails/Blank
in anunless else
context whenStyle/UnlessElse
is enabled. (@rrosenblum)
Changes
- #6854: Mark Rails/LexicallyScopedActionFilter as unsafe and document risks. (@urbanautomaton)
- #5977: Warn for Performance Cops. (@koic)
- #6637: Move
LstripRstrip
fromPerformance
toStyle
department and rename it toStrip
. (@anuja-joshi) - #6875: Mention block form of
Struct.new
inStyle/StructInheritance
. (@XrXr) - #6871: Move
Performance/RedundantSortBy
,Performance/UnneededSort
andPerformance/Sample
to the Style department. (@bbatsov)