Nothing particularly exciting this time around. The new release comes
with lots of bug fixes, more auto-corrections and several new cops.
Note that the Style/Encoding
cop is now disabled by default. See
#1304 for the rationale behind this change.
Below is the list of all the gory details. Enjoy!
New features
- New formatter
HTMLFormatter
generates a html file with a list of files with offences in them. (@SkuliOskarsson) - New cop
SpaceInsideRangeLiteral
checks for spaces around..
and...
in range literals. (@bbatsov) - New cop
InfiniteLoop
checks for places whereKernel#loop
should have been used. (@bbatsov) - New cop
SymbolProc
checks for places where a symbol can be used as proc instead of a block. (@bbatsov) UselessAssignment
cop now suggests a variable name for possible typos if there's a variable-ish identifier similar to the unused variable name in the same scope. (@yujinakayama)PredicateName
cop now has separate configurations for prefices that denote predicate method names and predicate prefices that should be removed. (@bbatsov)- #1272:
Tab
cop does auto-correction. (@yous) - #1274:
MultilineIfThen
cop does auto-correction. (@bbatsov) - #1279:
DotPosition
cop does auto-correction. (@yous) - #1277:
SpaceBeforeFirstArg
cop does auto-correction. (@yous) - #1310: Handle
module_function
inStyle/AccessModifierIndentation
andStyle/EmptyLinesAroundAccessModifier
. (@bbatsov)
Changes
- #1289: Use utf-8 as default encoding for inspected files. (@jonas054)
- #1304:
Style/Encoding
is no longer a no-op on Ruby 2.x. It's also disabled by default, as projects not supporting 1.9 don't need to run it. (@bbatsov)
Bugs fixed
- #1263: Do not report
%W
literals with special escaped characters inUnneededCapitalW
. (@jonas054) - #1286: Fix a false positive in
VariableName
. (@bbatsov) - #1211: Fix false negative in
UselessAssignment
when there's a reference for the variable in an exclusive branch. (@yujinakayama) - #1307: Fix auto-correction of
RedundantBegin
cop deletes new line. (@yous) - #1283: Fix auto-correction of indented expressions in
PercentLiteralDelimiters
. (@jonas054) - #1315:
BracesAroundHashParameters
auto-correction removes whitespace around content inside braces. (@jspanjers) - #1313: Fix a false positive in
AndOr
when enforced style isconditionals
. (@bbatsov) - Handle post-conditional
while
anduntil
inAndOr
when enforced style isconditionals
. (@yujinakayama) - #1319: Fix a false positive in
FormatString
. (@bbatsov) - #1287: Allow missing blank line for EmptyLinesAroundAccessModifier if next line closes a block. (@sch1zo)