Rubocop v0.28.0 Release Notes

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

    • #1450: New cop ExtraSpacing points out unnecessary spacing in files. ([@blainesch][])
    • ๐Ÿ†• New cop EmptyLinesAroundBlockBody provides same functionality as the EmptyLinesAround(Class|Method|Module)Body but for blocks. ([@jcarbo][])
    • ๐Ÿ†• New cop Style/EmptyElse checks for empty else-clauses. ([@Koronen][])
    • ๐Ÿ’… #1454: New --only-guide-cops and AllCops/StyleGuideCopsOnly options that will only enforce cops that link to a style guide. ([@marxarelli][])

    ๐Ÿ”„ Changes

    • ๐Ÿ’… #801: New style context_dependent for Style/BracesAroundHashParameters looks at preceding parameter to determine if braces should be used for final parameter. ([@jonas054][])
    • #1427: Excluding directories on the top level is now done earlier, so that these file trees are not searched, thus saving time when inspecting projects with many excluded files. ([@jonas054][])
    • #1325: When running with --auto-correct, only offenses that cannot be corrected will result in a non-zero exit code. ([@jonas054][])
    • ๐Ÿ’… #1445: Allow sprockets directive comments (starting with #=) in Style/LeadingCommentSpace. ([@bbatsov][])

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  Fix %W[] auto corrected to %w(]. ([@toy][])
    • ๐Ÿ›  Fix Style/ElseAlignment Cop to find the right parent on def/rescue/else/ensure/end. ([@oneamtu][])
    • #1181: (fix again) Style/StringLiterals cop stays away from strings inside interpolated expressions. ([@jonas054][])
    • ๐Ÿ’… #1441: Correct the logic used by Style/Blocks and other cops to determine if an auto-correction would alter the meaning of the code. ([@jonas054][])
    • ๐Ÿ’… #1449: Handle the case in MultilineOperationIndentation where instances of both correct style and unrecognized (plain wrong) style are detected during an --auto-gen-config run. ([@jonas054][])
    • #1456: Fix auto-correct in SymbolProc when there are multiple offenses on the same line. ([@jcarbo][])
    • #1459: Handle parenthesis around the condition in --auto-correct for NegatedWhile. ([@jonas054][])
    • #1465: Fix auto-correct of code like #$1 in PerlBackrefs. ([@bbatsov][])
    • ๐Ÿ›  Fix auto-correct of code like #$: in SpecialGlobalVars. ([@bbatsov][])
    • #1466: Allow leading underscore for unused parameters in SingleLineBlockParams. ([@jonas054][])
    • #1470: Handle elsif + else in ElseAlignment. ([@jonas054][])
    • ๐Ÿ’… #1474: Multiline string with both << and \ caught by Style/LineEndConcatenation cop. ([@katieschilling][])
    • #1485: Ignore procs in SymbolProc. ([@bbatsov][])
    • ๐Ÿ’… #1473: Style/MultilineOperationIndentation doesn't recognize assignment to array/hash element. ([@jonas054][])