New features
Rails/TimeZone
emits acceptable methods on a violation whenEnforcedStyle
is:acceptable
. (@l8nite)- Recognize rackup file (config.ru) out of the box. (@carhartl)
- #1788: New cop
ModuleLength
checks for overly long module definitions. (@sdeframond) - New cop
Performance/Count
to convertEnumerable#select...size
,Enumerable#reject...size
,Enumerable#select...count
,Enumerable#reject...count
Enumerable#select...length
, andEnumerable#reject...length
toEnumerable#count
. (@rrosenblum) CommentAnnotation
cop does auto-correction. (@dylandavidson)- New cop
Style/TrailingUnderscoreVariable
to remove trailing underscore variables from mass assignment. (@rrosenblum) - #1136: New cop
Performance/ParallelAssignment
to avoid usages of unnessary parallel assignment. (@rrosenblum) - #1278:
DefEndAlignment
andEndAlignment
cops do auto-correction. (@lumeet) IndentationWidth
cop follows theAlignWith
option of theDefEndAlignment
cop. (@lumeet)- #1837: New cop
EachWithObjectArgument
checks thateach_with_object
isn't called with an immutable object as argument. (@jonas054) ArrayJoin
cop does auto-correction. (@tmr08c)
Bugs fixed
- #1816: Fix bug in
Sample
when calling#shuffle
with something other than an element selector. (@rrosenblum) - #1768:
DefEndAlignment
recognizes precedingprivate_class_method
orpublic_class_method
beforedef
. (@til) - #1820: Correct the logic in
AlignHash
for when to ignore a key because it's not on its own line. (@jonas054) - #1829: Fix bug in
Sample
andFlatMap
that would cause them to report having been auto-corrected when they were not. (@rrosenblum) - #1832: Fix bug in
UnusedMethodArgument
that would cause them to report having been auto-corrected when they were not. (@jonas054) - #1834: Support only boolean values for
AutoCorrect
configuration parameter, and remove warning for unknown parameter. (@jonas054) - #1843: Fix crash in
TrailingBlankLines
when a file ends with a block comment without final newline. (@jonas054) - #1849: Fix bug where you can not have nested arrays in the Rake task configuration. (@rrosenblum)
- Fix bug in
MultilineTernaryOperator
where it will not register an offense when only the false branch is on a separate line. (@rrosenblum) - Fix crash in
MultilineBlockLayout
when using new lambda literal syntax without parentheses. (@hbd225) - #1859: Fix bugs in
IfUnlessModifier
concerning comments and empty lines. (@jonas054) - Fix handling of trailing comma in
SpaceAroundBlockParameters
andSpaceAfterComma
. (@lumeet)