Rubocop v0.26.0 Release Notes

Release Date: 2014-09-03 // over 9 years ago
  • ๐Ÿ†• New features

    • ๐Ÿ†• New formatter HTMLFormatter generates a html file with a list of files with offences in them. ([@SkuliOskarsson][])
    • ๐Ÿ†• New cop SpaceInsideRangeLiteral checks for spaces around .. and ... in range literals. ([@bbatsov][])
    • ๐Ÿ†• New cop InfiniteLoop checks for places where Kernel#loop should have been used. ([@bbatsov][])
    • ๐Ÿ†• New cop SymbolProc checks for places where a symbol can be used as proc instead of a block. ([@bbatsov][])
    • โœ๏ธ UselessAssignment cop now suggests a variable name for possible typos if there's a variable-ish identifier similar to the unused variable name in the same scope. ([@yujinakayama][])
    • ๐Ÿ”ง PredicateName cop now has separate configurations for prefices that denote predicate method names and predicate prefices that should be removed. ([@bbatsov][])
    • #1272: Tab cop does auto-correction. ([@yous][])
    • #1274: MultilineIfThen cop does auto-correction. ([@bbatsov][])
    • #1279: DotPosition cop does auto-correction. ([@yous][])
    • #1277: SpaceBeforeFirstArg cop does auto-correction. ([@yous][])
    • ๐Ÿ’… #1310: Handle module_function in Style/AccessModifierIndentation and Style/EmptyLinesAroundAccessModifier. ([@bbatsov][])

    ๐Ÿ”„ Changes

    • 0๏ธโƒฃ #1289: Use utf-8 as default encoding for inspected files. ([@jonas054][])
    • ๐Ÿ’… #1304: Style/Encoding is no longer a no-op on Ruby 2.x. It's also disabled by default, as projects not supporting 1.9 don't need to run it. ([@bbatsov][])

    ๐Ÿ› Bugs fixed

    • #1263: Do not report %W literals with special escaped characters in UnneededCapitalW. ([@jonas054][])
    • #1286: Fix a false positive in VariableName. ([@bbatsov][])
    • #1211: Fix false negative in UselessAssignment when there's a reference for the variable in an exclusive branch. ([@yujinakayama][])
    • #1307: Fix auto-correction of RedundantBegin cop deletes new line. ([@yous][])
    • #1283: Fix auto-correction of indented expressions in PercentLiteralDelimiters. ([@jonas054][])
    • ๐Ÿšš #1315: BracesAroundHashParameters auto-correction removes whitespace around content inside braces. ([@jspanjers][])
    • ๐Ÿ’… #1313: Fix a false positive in AndOr when enforced style is conditionals. ([@bbatsov][])
    • ๐Ÿ’… Handle post-conditional while and until in AndOr when enforced style is conditionals. ([@yujinakayama][])
    • #1319: Fix a false positive in FormatString. ([@bbatsov][])
    • #1287: Allow missing blank line for EmptyLinesAroundAccessModifier if next line closes a block. ([@sch1zo][])