github rubocop/rubocop v0.32.0

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

New features

  • Adjust behavior of TrailingComma cop to account for multi-line hashes nested within method calls. (@panthomakos)
  • #1719: Display an error and abort the program if input file can't be found. (@matugm)
  • New cop SpaceInsideStringInterpolation checks for spaces within string interpolations. (@glasnt)
  • New cop NestedMethodDefinition checks for method definitions inside other methods. (@ojab)
  • LiteralInInterpolation cop does auto-correction. (@tmr08c)
  • #1865: New cop Lint/UnneededDisable checks for rubocop:disable comments that can be removed. (@jonas054)
  • EmptyElse cop does auto-correction. (@lumeet)
  • Show reference links when displaying style guide links. (@rrosenblum)
  • Debugger cop now checks for the Capybara debug method save_screenshot. (@crazydog115)
  • #1282: CaseIndentation cop does auto-correction. (@lumeet)
  • #1928: Do auto-correction one offense at a time (rather than one cop at a time) if there are tabs in the code. (@jonas054)

Changes

  • Prefer SpaceInsideBlockBraces to SpaceBeforeSemicolon and SpaceAfterSemicolon to avoid an infinite loop when auto-correcting. (@lumeet)
  • #1873: Move ParallelAssignment cop from Performance to Style. (@rrosenblum)
  • Add getlocal to acceptable methods of Rails/TimeZone. (@ojab)
  • #1851, #1948: Change offense message for ClassLength and ModuleLength to match that of MethodLength. (@bquorning)

Bugs fixed

  • Don't count required keyword args when specifying CountKeywordArgs: false for ParameterLists. (@sumeet)
  • #1879: Avoid auto-correcting hash with trailing comma into invalid code in BracesAroundHashParameters. (@jonas054)
  • #1868: Do not register an offense in Performance/Count when select is called with symbols or strings as the parameters. (@rrosenblum)
  • Sample rewritten to properly handle shuffle randomness source, first/last params and non-literal ranges. (@chastell)
  • #1873: Modify ParallelAssignment to properly autocorrect when the assignment is protected by a modifier statement. (@rrosenblum)
  • Configure ParallelAssignment to work with non-standard IndentationWidths. (@rrosenblum)
  • #1899: Be careful about comments when auto-correcting in BracesAroundHashParameters. (@jonas054)
  • #1897: Don't report that semicolon separated statements can be converted to modifier form in IfUnlessModifier (and don't auto-correct them). (@jonas054)
  • #1644: Don't search the entire file system when a folder is named , (fix for jruby and rbx). (@rrosenblum)
  • #1803: Don't warn for return from lambda block in NonLocalExitFromIterator. (@ypresto)
  • #1905: Ignore sparse and trailing comments in Style/Documentation. (@RGBD)
  • #1923: Handle properly for without body in Style/Next. (@bbatsov)
  • #1901: Do not auto correct comments that are missing a note. (@rrosenblum)
  • #1926: Fix crash in Style/AlignHash when correcting a hash with a splat in it. (@rrosenblum)
  • #1935: Allow Symbol#to_proc blocks in Performance/Size. (@m1foley)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.