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 whereFixnum#even?
orFixnum#odd?
should have been used (likex % 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 deprecatedHash
methods. - New Rails cop
HasAndBelongsToMany
checks for uses ofhas_and_belongs_to_many
. - ๐ New Rails cop
ReadAttribute
tracks uses ofread_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. Nowprogress
/simple
/clang
formatters always report summary andemacs
/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
inAccessControl
. - ๐ Fix which ranges are highlighted in reports from IfUnlessModifier, WhileUntilModifier, and MethodAndVariableSnakeCase cop.
- #438: Accept setting attribute on method argument in
UselessAssignment
.