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 ondo
...end
blocks. - ๐ง #456: New configuration parameter
AllCops
/RunRailsCops
can be set totrue
for a project, removing the need to give the-R
/--rails
option with every invocation ofrubocop
. - ๐จ #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 outputscorrected
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 likeraise RuntimeError, message
. - #526: New cop
RaiseArgs
checks the args passed toraise/fail
.
๐ Changes
- ๐
Cop
MethodAndVariableSnakeCase
replaced byMethodName
andVariableName
, both having the configuration parameterEnforcedStyle
with valuessnake_case
(default) andcamelCase
. - ๐ง #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 areturn
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 ofraise
orfail
. - ๐ง
LambdaCall
is now configurable and enforce eitherProc#call
orProc#()
. - ๐
#529: Added config option
EnforcedStyle
toSpaceAroundBraces
. - #529: Changed config option
NoSpaceBeforeBlockParameters
toSpaceBeforeBlockParameters
. - ๐ 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 istable
for '=>' andseparator
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 withwarning
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
andAlignArray
auto-correction to destroy code. - #516: Fix bug causing
RedundantReturn
auto-correction to produce invalid code. - #527: Handle
!=
expressions inEvenOdd
cop. - ๐ฆ
SignalException
cop now findsraise
calls anywhere, not only inbegin
sections. - #538: Fix bug causing
Blocks
auto-correction to produce invalid code.
- #491: New cop