Rubocop v0.9.0 Release Notes
Release Date: 2013-07-01 // almost 11 years ago-
๐ New features
- Introduced formatter feature, enables custom formatted output and multiple outputs.
- โ Added progress formatter and now it's the default. (
--format progress
). - โ Added JSON formatter. (
--format json
). - โ Added clang style formatter showing the offending source. code. (
--format clang
). Theclang
formatter marks a whole range rather than just the starting position, to indicate more clearly where the problem is. - โ Added
-f
/--format
option to specify formatter. - โ Added
-o
/--out
option to specify output file for each formatter. - โ Added
-r/--require
option to inject external Ruby code into RuboCop. - โ Added
-V/--verbose-version
option that displays Parser version and Ruby version as well. - โ Added
-R/--rails
option that enables extra Rails-specific cops. - โ Added support for auto-correction of some offences with
-a
/--auto-correct
. - ๐ New cop
CaseEquality
checks for explicit use of===
. - ๐ New cop
AssignmentInCondition
checks for assignment in conditions. - ๐ New cop
EndAlignment
tracks misalignedend
keywords. - ๐ New cop
Void
tracks uses of literals/variables/operators in possibly void context. - ๐ New cop
Documentation
checks for top level class/module doc comments. - ๐ New cop
UnreachableCode
tracks unreachable code segments. - ๐ New cop
MethodCallParentheses
tracks unwanted braces in method calls. - ๐ New cop
UnusedLocalVariable
tracks unused local variables for each scope. - ๐ New cop
ShadowingOuterLocalVariable
tracks use of the same name as outer local variables for block arguments or block local variables. - ๐ New cop
WhileUntilDo
tracks uses ofdo
with multi-linewhile/until
. - ๐ New cop
CharacterLiteral
tracks uses of character literals (?x
). - ๐ New cop
EndInMethod
tracks uses ofEND
in method definitions. - ๐ New cop
LiteralInCondition
tracks uses of literals in the conditions ofif/while/until
. - ๐ New cop
BeginBlock
tracks uses ofBEGIN
blocks. - ๐ New cop
EndBlock
tracks uses ofEND
blocks. - ๐ New cop
DotPosition
tracks the dot position in multi-line method calls. - ๐ New cop
Attr
tracks uses ofModule#attr
. - โ Add support for auto-correction of some offences with
-a
/--auto-correct
.
๐ Changes
- ๐ Deprecated
-e
/--emacs
option. (Use--format emacs
instead). - 0๏ธโฃ Made
progress
formatter the default. - ๐จ Most formatters (
progress
,simple
andclang
) now print relative file paths if the paths are under the current working directory. - ๐
Migrate all cops to new namespaces.
Rubocop::Cop::Lint
is for cops that emit warnings.Rubocop::Cop::Style
is for cops that do not belong in other namespaces. - ๐ง Merge
FavorPercentR
andPercentR
into one cop calledRegexpLiteral
, and add configuration parameterMaxSlashes
. - โ Add
CountKeywordArgs
configuration option toParameterLists
cop.
๐ Bugs fixed
- ๐ #239: Fixed double quotes false positives.
- #233: Report syntax cop offences.
- ๐ Fix off-by-one error in favor_modifier.
- #229: Recognize a line with CR+LF as a blank line in AccessControl cop.
- #235: Handle multiple constant assignment in ConstantName cop.
- #246: Correct handling of unicode escapes within double quotes.
- ๐ Fix crashes in Blocks, CaseEquality, CaseIndentation, ClassAndModuleCamelCase, ClassMethods, CollectionMethods, and ColonMethodCall.
- #263: Do not check for space around operators called with method syntax.
- #271: Always allow line breaks inside hash literal braces.
- ๐ #270: Fixed a false positive in ParenthesesAroundCondition.
- #288: Get config parameter AllCops/Excludes from highest config file in path.
- #276: Let columns start at 1 instead of 0 in all output of column numbers.
- #292: Don't check non-regular files (like sockets, etc).
- ๐ Fix crashes in WordArray on arrays of character literals such as
[?\r, ?\n]
. - ๐ Fix crashes in Documentation on empty modules.