Rubocop v0.22.0 Release Notes

Release Date: 2014-05-20 // almost 10 years ago
  • ๐Ÿ†• New features

    • #974: New cop CommentIndentation checks indentation of comments. ([@jonas054][])
    • Add new cop EachWithObject to prefer each_with_object over inject or reduce. ([@geniou][])
    • #1010: New Cop Next check for conditions at the end of an iteration and propose to use next instead. ([@geniou][])
    • ๐Ÿ”ง The GuardClause cop now also looks for unless and it is configurable how many lines the body of an if / unless needs to have to not be ignored. ([@geniou][])
    • #835: New cop UnneededPercentX checks for %x when backquotes would do. ([@jonas054][])
    • โž• Add auto-correct to UnusedBlockArgument and UnusedMethodArgument cops. ([@hannestyden][])
    • #1074: New cop SpaceBeforeComment checks for missing space between code and a comment on the same line. ([@jonas054][])
    • #1089: New option -F/--fail-fast inspects files in modification time order and stop after the first file with offenses. ([@jonas054][])
    • โž• Add optional require directive to .rubocop.yml to load custom ruby files. ([@geniou][])

    ๐Ÿ”„ Changes

    • ๐Ÿ”ง NonNilCheck offense reporting and auto-correct are configurable to include semantic changes. ([@hannestyden][])
    • โš  The parameters AllCops/Excludes and AllCops/Includes with final s only give a warning and don't halt rubocop execution. ([@jonas054][])
    • ๐Ÿ‘€ The GuardClause cop is no longer ignoring a one-line body by default - see configuration. ([@geniou][])
    • #1050: Rename rubocop-todo.yml file to .rubocop_todo.yml. ([@geniou][])
    • 0๏ธโƒฃ #1064: Adjust default max line length to 80. ([@bbatsov][])

    ๐Ÿ› Bugs fixed

    • ๐Ÿ‘ Allow assignment in AlignParameters cop. ([@tommeier][])
    • ๐Ÿ›  Fix Void and SpaceAroundOperators for short call syntax lambda.(). ([@biinari][])
    • ๐Ÿ›  Fix Delegate for delegation with assignment or constant. ([@geniou][])
    • ๐Ÿšš #1032: Avoid duplicate reporting when code moves around due to --auto-correct. ([@jonas054][])
    • #1036: Handle strings like __FILE__ in LineEndConcatenation. ([@bbatsov][])
    • #1006: Fix LineEndConcatenation to handle chained concatenations. ([@barunio][])
    • #1066: Fix auto-correct for NegatedIf when the condition has parentheses around it. ([@jonas054][])
    • ๐Ÿ›  Fix AlignParameters with_fixed_indentation for multi-line method calls. ([@molawson][])
    • ๐Ÿ›  Fix problem that appears in some installations when reading empty YAML files. ([@jonas054][])
    • ๐Ÿ”ง #1022: A Cop will no longer auto-correct a file that's excluded through an Exclude setting in the cop's configuration. ([@jonas054][])
    • ๐Ÿ›  Fix paths in Exclude config section not being recognized on Windows. ([@wndhydrnt][])
    • #1094: Fix ClassAndModuleChildren for classes with a single method. ([@geniou][])