github rubocop/rubocop v0.24.0
RuboCop 0.24.0

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

This release is mostly about fixing bugs, but it also features a few new cops.

Below is the list of all the gory details. Enjoy!

New features

  • #639: Support square bracket setters in UselessSetterCall. (@yujinakayama)
  • #835: UnneededCapitalW cop does auto-correction. (@sfeldon)
  • #1092: New cop DefEndAlignment takes over responsibility for checkng alignment of method definition ends from EndAlignment, and is configurable. (@jonas054)
  • #1145: New cop ClassCheck enforces consistent use of is_a? or kind_of?. (@bbatsov)
  • #1161: New cop SpaceBeforeComma detects spaces before a comma. (@agrimm)
  • #1161: New cop SpaceBeforeSemicolon detects spaces before a semicolon. (@agrimm)
  • #835: New cop UnneededPercentQ checks for usage of the %q/%Q syntax when '' or "" would do. (@jonas054)
  • #977: Add AllowURI option (enabled by default) to LineLength cop. (@yujinakayama)

Changes

  • Unused block local variables (obj.each { |arg; this| }) are now handled by UnusedBlockArgument cop instead of UselessAssignment cop. (@yujinakayama)
  • #1141: Clarify in the message from TrailingComma that a trailing comma is never allowed for lists where some items share a line. (@jonas054)

Bugs fixed

  • #1133: Handle reduce/inject with no arguments in EachWithObject. (@bbatsov)
  • #1152: Handle while/until with no body in Next. (@tamird)
  • Fix a false positive in UselessSetterCall for setter call on a local variable that contains a non-local object. (@yujinakayama)
  • #1158: Fix auto-correction of floating-point numbers. (@bbatsov)
  • #1159: Fix checking of begin..end structures, blocks, and parenthesized expressions in IndentationWidth. (@jonas054)
  • #1159: More rigid conditions for when attr is considered an offense. (@jonas054)
  • #1167: Fix handling of parameters spanning multiple lines in TrailingComma. (@jonas054)
  • #1169: Fix handling of ternary op conditions in ParenthesesAroundCondition. (@bbatsov)
  • #1147: WordArray checks arrays with special characters. (@camilleldn)
  • Fix a false positive against return in a loop in Next cop. (@yujinakayama)
  • #1165: Support rescue/else/ensure bodies in IndentationWidth. (@jonas054)
  • Fix false positive for aligned list of values after when in IndentationWidth. (@jonas054)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.