github rubocop/rubocop v0.31.0
RuboCop 0.31

latest releases: v1.63.5, v1.63.3, v1.63.4...
9 years ago

New features

  • Rails/TimeZone emits acceptable methods on a violation when EnforcedStyle 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 convert Enumerable#select...size, Enumerable#reject...size, Enumerable#select...count, Enumerable#reject...count Enumerable#select...length, and Enumerable#reject...length to Enumerable#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 and EndAlignment cops do auto-correction. (@lumeet)
  • IndentationWidth cop follows the AlignWith option of the DefEndAlignment cop. (@lumeet)
  • #1837: New cop EachWithObjectArgument checks that each_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 preceding private_class_method or public_class_method before def. (@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 and FlatMap 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 and SpaceAfterComma. (@lumeet)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.