Rubocop v0.13.0 Release Notes
Release Date: 2013-09-13 // over 10 years ago-
๐ New features
- ๐ New configuration parameter
AllowAdjacentOneLineDefs
forEmptyLineBetweenDefs
. - ๐ New cop
MultilineBlockChain
keeps track of chained blocks spanning multiple lines. RedundantSelf
cop does auto-correction.AvoidPerlBackrefs
cop does auto-correction.AvoidPerlisms
cop does auto-correction.RedundantReturn
cop does auto-correction.Blocks
cop does auto-correction.- ๐ New cop
TrailingBlankLines
keeps track of extra blanks lines at the end of source file. - ๐ New cop
AlignHash
keeps track of bad alignment in multi-line hash literals. - ๐ New cop
AlignArray
keeps track of bad alignment in multi-line array literals. - ๐ New cop
SpaceBeforeModifierKeyword
keeps track of missing space before a modifier keyword (if
,unless
,while
,until
). - ๐ New cop
FinalNewline
keeps tracks of the required final newline in a source file. - Highlightling corrected in
SpaceInsideHashLiteralBraces
andSpaceAroundBraces
cops.
๐ Changes
- #447:
BlockAlignment
cop now allowsend
to be aligned with the start of the line containingdo
. SymbolName
now has anAllowDots
config option to allow symbols like:'whatever.submit_button'
.- #469: Extracted useless setter call tracking part of
UselessAssignment
cop toUselessSetterCall
. - ๐ #469: Merged
UnusedLocalVariable
cop intoUselessAssignment
. - ๐ #458: The merged
UselessAssignment
cop now has advanced logic that tracks not only assignment at the end of the method but also every assignment in every scope. - ๐ #466: Allow built-in JRuby global vars in
AvoidGlobalVars
. - โ Added a config option
AllowedVariables
toAvoidGlobalVars
to allow users to whitelist certain global variables. - ๐ Renamed
AvoidGlobalVars
toGlobalVars
. - ๐ Renamed
AvoidPerlisms
toSpecialGlobalVars
. - ๐ Renamed
AvoidFor
toFor
. - ๐ Renamed
AvoidClassVars
toClassVars
. - ๐ Renamed
AvoidPerlBackrefs
toPerlBackrefs
. NumericLiterals
now accepts a config paramMinDigits
- the minimal number of digits in the integer portion of number for the cop to check it.
๐ Bugs fixed
- ๐ #449: Remove whitespaces between condition and
do
withWhileUntilDo
auto-correction. - โ Continue with file inspection after parser warnings. Give up only on syntax errors.
- Don't trigger the HashSyntax cop on digit-starting keys.
- ๐ Fix crashes while inspecting class definition subclassing another class stored in a local variable in
UselessAssignment
(formerly ofUnusedLocalVariable
) andShadowingOuterLocalVariable
(likeclazz = Array; class SomeClass < clazz; end
). - #463: Do not warn if using destructuring in second
reduce
argument (ReduceArguments
).
- ๐ New configuration parameter