Rubocop v0.16.0 Release Notes

Release Date: 2013-12-25 // over 10 years ago
  • ๐Ÿ†• New features

    • #612: BracesAroundHashParameters cop does auto-correction. ([@dblock][])
    • #614: ParenthesesAroundCondition cop does auto-correction. ([@dblock][])
    • #624: EmptyLines cop does auto-correction. ([@dblock][])
    • ๐Ÿ†• New Rails cop DefaultScope ensures default_scope is called properly with a block argument. ([@bbatsov][])
    • ๐Ÿ‘ All cops now support the Include param, which specifies the files on which they should operate. ([@bbatsov][])
    • ๐Ÿ‘ All cops now support the Exclude param, which specifies the files on which they should not operate. ([@bbatsov][])
    • #631: IndentationWidth cop now detects inconsistent indentation between lines that should have the same indentation. ([@jonas054][])
    • #649: EmptyLinesAroundBody cop does auto-correction. ([@dblock][])
    • #657: Alias cop does auto-correction. ([@dblock][])
    • ๐Ÿ‘ Rake task now support setting formatters. ([@pmenglund][])
    • ๐Ÿ”ง #653: CaseIndentation cop is now configurable with parameters IndentWhenRelativeTo and IndentOneStep. ([@jonas054][])
    • ๐Ÿ”ง #654: For cop is now configurable to enforce either each (default) or for. ([@jonas054][])
    • ๐Ÿ”ง #661: EndAlignment cop is now configurable for alignment with keyword (default) or variable. ([@jonas054][])
    • ๐Ÿ‘ Allow to overwrite the severity of a cop with the new Severity param. ([@codez][])
    • ๐Ÿ†• New cop FlipFlop checks for flip flops. ([@agrimm][])
    • #577: Introduced MethodDefParentheses to allow for for requiring either parentheses or no parentheses in method definitions. Replaces DefWithoutParentheses. ([@skanev][])
    • ๐Ÿ‘ #693: Generation of parameter values (i.e., not only Enabled: false) in rubocop-todo.yml by the --auto-gen-config option is now supported for some cops. ([@jonas054][])
    • New cop AccessorMethodName checks accessor method names for non-idiomatic names like get_attribute and set_attribute. ([@bbatsov][])
    • New cop PredicateName checks the names of predicate methods for non-idiomatic names like is_something, has_something, etc. ([@bbatsov][])
    • ๐Ÿ‘Œ Support Ruby 2.1 with Parser 2.1. ([@yujinakayama][])

    ๐Ÿ”„ Changes

    • โœ‚ Removed SymbolNames as it was generating way too many false positives. ([@bbatsov][])
    • ๐Ÿ”ง Renamed ReduceArguments to SingleLineBlockParams and made it configurable. ([@bbatsov][])

    ๐Ÿ› Bugs fixed

    • ๐Ÿ– Handle properly heredocs in StringLiterals cop. ([@bbatsov][])
    • ๐Ÿ›  Fix SpaceAroundOperators to not report missing space around operator for def self.method *args. ([@jonas054][])
    • Properly handle ['AllCops']['Includes'] and ['AllCops']['Excludes'] when passing config via -c. ([@fancyremarker][], [@codez][])
    • #611: Fix crash when loading an empty config file. ([@sinisterchipmunk][])
    • ๐Ÿ›  Fix DotPosition cop with trailing style for method calls on same line. ([@vonTronje][])
    • #627: Fix counting of slashes in complicated regexps in RegexpLiteral cop. ([@jonas054][])
    • #638: Fix bug in auto-correct that changes each{ |x| to each d o |x|. ([@jonas054][])
    • ๐Ÿ”ง #418: Stop searching for configuration files above the work directory of the isolated environment when running specs. ([@jonas054][])
    • ๐Ÿ›  Fix error on implicit match conditionals (e.g. if /pattern/; end) in MultilineIfThen. ([@agrimm][])
    • #651: Handle properly method arguments in RedundantSelf. ([@bbatsov][])
    • #628: Allow self.Foo in RedundantSelf cop. ([@chulkilee][])
    • 0๏ธโƒฃ #668: Fix crash in EndOfLine that occurs when default encoding is US_ASCII and an inspected file has non-ascii characters. ([@jonas054][])
    • #664: Accept oneline while when condition has local variable assignment. ([@emou][])
    • ๐Ÿ›  Fix auto-correct for MethodDefParentheses when parentheses are required. ([@skanev][])