Rubocop v0.12.0 Release Notes

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

    • #439: Added formatter 'OffenceCount' which outputs a summary list of cops and their offence count.
    • #395: Added --show-cops option to show available cops.
    • ๐Ÿ†• New cop NilComparison keeps track of comparisons like == nil.
    • ๐Ÿ†• New cop EvenOdd keeps track of occasions where Fixnum#even? or Fixnum#odd? should have been used (like x % 2 == 0).
    • ๐Ÿ†• New cop IndentationWidth checks for files using indentation that is not two spaces.
    • ๐Ÿ†• New cop SpaceAfterMethodName keeps track of method definitions with a space between the method name and the opening parenthesis.
    • ๐Ÿ†• New cop ParenthesesAsGroupedExpression keeps track of method calls with a space before the opening parenthesis.
    • ๐Ÿ†• New cop HashMethods keeps track of uses of deprecated Hash methods.
    • New Rails cop HasAndBelongsToMany checks for uses of has_and_belongs_to_many.
    • ๐Ÿ†• New Rails cop ReadAttribute tracks uses of read_attribute.
    • Attr cop does auto-correction.
    • CollectionMethods cop does auto-correction.
    • ๐Ÿšฆ SignalException cop does auto-correction.
    • EmptyLiteral cop does auto-correction.
    • MethodCallParentheses cop does auto-correction.
    • DefWithParentheses cop does auto-correction.
    • DefWithoutParentheses cop does auto-correction.

    ๐Ÿ”„ Changes

    • โฌ‡๏ธ Dropped -s/--silent option. Now progress/simple/clang formatters always report summary and emacs/files formatters no longer report.
    • โฌ‡๏ธ Dropped the LineContinuation cop.

    ๐Ÿ› Bugs fixed

    • #432: Fix false positive for constant assignments when rhs is a method call with block in ConstantName.
    • ๐Ÿ‘ #434: Support classes and modules defined with Class.new/Module.new in AccessControl.
    • ๐Ÿ›  Fix which ranges are highlighted in reports from IfUnlessModifier, WhileUntilModifier, and MethodAndVariableSnakeCase cop.
    • #438: Accept setting attribute on method argument in UselessAssignment.