New features
- #2798:
Rails/FindEach
cop works withwhere.not
. (@pocke) Style/MultilineBlockLayout
can correct offenses which involve argument destructuring. (@alexdowad)Style/SpaceAroundKeyword
checkssuper
nodes with no args. (@alexdowad)Style/SpaceAroundKeyword
checksdefined?
nodes. (@alexdowad)- #2719:
Style/ConditionalAssignment
handles correcting the alignment ofend
. (@rrosenblum)
Bug fixes
- Fix auto-correction of
not
with parentheses inStyle/Not
. (@lumeet) - #2784: RuboCop can inspect
super { ... }
andsuper(arg) { ... }
. (@alexdowad) - #2781:
Performance/RedundantMerge
doesn't flag calls to#update
, since many classes have methods by this name (not onlyHash
). (@alexdowad) - #2780:
Lint/DuplicateMethods
does not flag method definitions inside dynamicClass.new
blocks. (@alexdowad) - #2775:
Style/SpaceAroundKeyword
doesn't flagyield.method
. (@alexdowad) - #2774:
Style/SpaceAroundOperators
doesn't flag calls to#[]
. (@alexdowad) - #2772: RuboCop doesn't crash when
AllCops
section in configuration file is empty (rather, it displays a warning as intended). (@alexdowad) - #2737:
Style/GuardClause
handleselsif
clauses correctly. (@alexdowad) - #2735:
Style/MultilineBlockLayout
doesn't cause an infinite loop by movingend
onto the same line as the block args. (@alexdowad) - #2715:
Performance/RedundantMatch
doesn't flag calls to#match
which take a block. (@alexdowad) - #2704:
Lint/NestedMethodDefinition
doesn't flag singleton defs which define a method on the value of a local variable. (@alexdowad) - #2660:
Style/TrailingUnderscoreVariable
shows recommended code in its offense message. (@alexdowad) - #2671:
Style/WordArray
doesn't attempt to inspect strings with invalid encoding, to avoid failing with an encoding error. (@alexdowad)
Changes
- #2739: Change the configuration option
when_needed
inStyle/FrozenStringLiteralComment
to add afrozen_string_literal
comment to all files when theTargetRubyVersion
is set to 2.3+. (@rrosenblum)