Rubocop v0.10.0 Release Notes

Release Date: 2013-07-17 // almost 11 years ago
  • ๐Ÿ†• New features

    • ๐Ÿ†• New cop RedundantReturn tracks redundant returns in method bodies.
    • ๐Ÿ†• New cop RedundantBegin tracks redundant begin blocks in method definitions.
    • ๐Ÿ†• New cop RedundantSelf tracks redundant uses of self.
    • ๐Ÿ†• New cop EmptyEnsure tracks empty ensure blocks.
    • ๐Ÿ†• New cop CommentAnnotation tracks formatting of annotation comments such as TODO.
    • โž• Added custom rake task.
    • ๐Ÿ†• New formatter FileListFormatter outputs just a list of files with offences in them (related to #357).

    ๐Ÿ”„ Changes

    • TrivialAccessors now has an ExactNameMatch config option (related to #308).
    • TrivialAccessors now has an ExcludePredicates config option (related to #326).
    • ๐Ÿ“š Cops don't inherit from Parser::AST::Rewriter anymore. All 3rd party Cops should remove the call to super in their callbacks. If you implement your own processing you need to define the #investigate method instead of #inspect. Refer to the documentation of Cop::Commissioner and Cop::Cop classes for more information.
    • EndAlignment cop split into EndAlignment and BlockAlignment cops.

    ๐Ÿ› Bugs fixed

    • #288: Work with absolute Excludes paths internally (2nd fix for this issue).
    • TrivialAccessors now detects class attributes as well as instance attributes.
    • #338: Fix end alignment of blocks in chained assignments.
    • #345: Add $SAFE to the list of built-in global variables.
    • ๐Ÿ”€ #340: Override config parameters rather than merging them.
    • #349: Fix false positive for CharacterLiteral (%w(?)).
    • ๐Ÿ‘ #346: Support method chains for block end alignment checks.
    • ๐Ÿ‘ #350: Support line breaks between variables on left hand side for block end alignment checks.
    • #356: Allow safe assignment in ParenthesesAroundCondition.

    Misc

    • ๐Ÿ‘Œ Improved performance on Ruby 1.9 by about 20%.
    • ๐Ÿ‘Œ Improved overall performance by about 35%.