Rubocop v0.14.0 Release Notes

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

    • #491: New cop MethodCalledOnDoEndBlock keeps track of methods called on do...end blocks.
    • ๐Ÿ”ง #456: New configuration parameter AllCops/RunRailsCops can be set to true for a project, removing the need to give the -R/--rails option with every invocation of rubocop.
    • ๐Ÿ–จ #501: simple/clang/progress/emacs formatters now print [Corrected] along with offence message when the offence is automatically corrected.
    • ๐Ÿ–จ #501: simple/clang/progress formatters now print count of auto-corrected offences in the final summary.
    • #501: json formatter now outputs corrected key with boolean value in offence objects whether the offence is automatically corrected.
    • ๐Ÿ†• New cop ClassLength checks for overly long class definitions.
    • ๐Ÿ†• New cop Debugger checks for forgotten calls to debugger or pry.
    • ๐Ÿ†• New cop RedundantException checks for code like raise RuntimeError, message.
    • #526: New cop RaiseArgs checks the args passed to raise/fail.

    ๐Ÿ”„ Changes

    • ๐Ÿ’… Cop MethodAndVariableSnakeCase replaced by MethodName and VariableName, both having the configuration parameter EnforcedStyle with values snake_case (default) and camelCase.
    • ๐Ÿ”ง #519: HashSyntax cop is now configurable and can enforce the use of the classic hash rockets syntax.
    • ๐Ÿ”ง #520: StringLiterals cop is now configurable and can enforce either single-quoted or double-quoted strings.
    • #528: Added a config option to RedundantReturn to allow a return with multiple values.
    • #524: Added a config option to Semicolon to allow the use of ; as an expression separator.
    • ๐Ÿšฆ #525: SignalException cop is now configurable and can enforce the semantic rule or an exclusive use of raise or fail.
    • ๐Ÿ”ง LambdaCall is now configurable and enforce either Proc#call or Proc#().
    • ๐Ÿ’… #529: Added config option EnforcedStyle to SpaceAroundBraces.
    • #529: Changed config option NoSpaceBeforeBlockParameters to SpaceBeforeBlockParameters.
    • ๐Ÿ‘Œ Support Parser 2.0.0 (non-beta).

    ๐Ÿ› Bugs fixed

    • #514: Fix alignment of the hash containing different key lengths in one line.
    • ๐Ÿ”ง #496: Fix corner case crash in AlignHash cop: single key/value pair when configuration is table for '=>' and separator for :.
    • #502: Don't check non-decimal literals with NumericLiterals.
    • #448: Fix auto-correction of parameters spanning more than one line in AlignParameters cop.
    • โš  #493: Support disabling Syntax offences with warning severity.
    • ๐Ÿ›  Fix bug appearing when there were different values for the AllCops/RunRailsCops configuration parameter in different directories.
    • #512: Fix bug causing crash in AndOr auto-correction.
    • #515: Fix bug causing AlignParameters and AlignArray auto-correction to destroy code.
    • #516: Fix bug causing RedundantReturn auto-correction to produce invalid code.
    • #527: Handle != expressions in EvenOdd cop.
    • ๐Ÿšฆ SignalException cop now finds raise calls anywhere, not only in begin sections.
    • #538: Fix bug causing Blocks auto-correction to produce invalid code.