All Versions
151
Latest Version
Avg Release Cycle
7 days
Latest Release
790 days ago
Changelog History
Page 14
Changelog History
Page 14
-
v0.15.0 Changes
November 06, 2013๐ New features
- ๐ New cop
Output
checks for calls to print, puts, etc. in Rails. ([@daviddavis][]) - ๐ New cop
EmptyLinesAroundBody
checks for empty lines around the bodies of class, method and module definitions. ([@bbatsov][]) LeadingCommentSpace
cop does auto-correction. ([@jonas054][])SpaceAfterControlKeyword
cop does auto-correction. ([@jonas054][])SpaceAfterColon
cop does auto-correction. ([@jonas054][])SpaceAfterComma
cop does auto-correction. ([@jonas054][])SpaceAfterSemicolon
cop does auto-correction. ([@jonas054][])SpaceAfterMethodName
cop does auto-correction. ([@jonas054][])SpaceAroundBlockBraces
cop does auto-correction. ([@jonas054][])- 0๏ธโฃ
SpaceAroundEqualsInParameterDefault
cop does auto-correction. ([@jonas054][]) SpaceAroundOperators
cop does auto-correction. ([@jonas054][])SpaceBeforeModifierKeyword
cop does auto-correction. ([@jonas054][])SpaceInsideHashLiteralBraces
cop does auto-correction. ([@jonas054][])SpaceInsideBrackets
cop does auto-correction. ([@jonas054][])SpaceInsideParens
cop does auto-correction. ([@jonas054][])TrailingWhitespace
cop does auto-correction. ([@jonas054][])TrailingBlankLines
cop does auto-correction. ([@jonas054][])FinalNewline
cop does auto-correction. ([@jonas054][])- ๐ New cop
CyclomaticComplexity
checks the cyclomatic complexity of methods against a configurable max value. ([@jonas054][]) - ๐
#594: New parameter
EnforcedStyleForEmptyBraces
with valuesspace
andno_space
(default) added toSpaceAroundBlockBraces
. ([@jonas054][]) - 0๏ธโฃ #603: New parameter
MinSize
added toWordArray
to allow small string arrays, retaining the default (0). ([@claco][])
๐ Changes
- ๐ง #557: Configuration files for excluded files are no longer loaded. ([@jonas054][])
- 0๏ธโฃ #571: The default rake task now runs RuboCop over itself! ([@nevir][])
- ๐จ Encoding errors are reported as fatal offences rather than printed with red text. ([@jonas054][])
- ๐
AccessControl
cop is now configurable with theEnforcedStyle
option. ([@sds][]) - Split
AccessControl
cop toAccessModifierIndentation
andEmptyLinesAroundAccessModifier
. ([@bbatsov][]) - ๐
#594: Add configuration parameter
EnforcedStyleForEmptyBraces
toSpaceInsideHashLiteralBraces
cop, and changeEnforcedStyleIsWithSpaces
(valuestrue
,false
) toEnforcedStyle
(valuesspace
,no_space
). ([@jonas054][]) - ๐ Coverage builds linked from the README page are enabled again. ([@jonas054][])
๐ Bugs fixed
- #561: Handle properly negative literals in
NumericLiterals
cop. ([@bbatsov][]) - #567: Register an offence when the last hash parameter has braces in
BracesAroundHashParameters
cop. ([@dblock][]) StringLiterals
cop no longer reports errors for character literals such as ?/. That should be done only by theCharacterLiterals
cop. ([@jonas054][])- Made auto-correct much less likely to crash due to conflicting corrections ("clobbering"). ([@jonas054][])
- #565:
$GLOBAL_VAR from English library
should no longer be inserted when auto-correcting short-form global variables like$!
. ([@nevir][]) - #566: Methods that just assign a splat to an ivar are no longer considered trivial writers. ([@nevir][])
- #585:
MethodCallParentheses
should allow methods starting with uppercase letter. ([@bbatsov][]) - #574: Fix error on multiple-assignment with non-array right hand side in
UselessSetterCall
. ([@yujinakayama][]) - โ #576: Output config validation warning to STDERR so that it won't be mixed up with formatter's output. ([@yujinakayama][])
- #599:
EndOfLine
cop is operational again. ([@jonas054][]) - #604: Fix error on implicit match conditionals (e.g.
if /pattern/; end
) inFavorModifier
. ([@yujinakayama][]) - #600: Don't require an empty line for access modifiers at the beginning of class/module body. ([@bbatsov][])
- #608:
RescueException
no longer crashes when the namespace of a rescued class is in a local variable. ([@jonas054][]) - #173: Allow the use of
alias
in the body of aninstance_exec
. ([@bbatsov][]) - #554: Handle properly multi-line arrays with comments in them in
WordArray
. ([@bbatsov][])
- ๐ New cop
-
v0.14.1 Changes
October 10, 2013๐ New features
- #551: New cop
BracesAroundHashParameters
checks for braces in function calls with hash parameters. ([@dblock][]) - ๐ New cop
SpaceAfterNot
tracks redundant space after the!
operator. ([@bbatsov][])
๐ Bugs fixed
- ๐ Fix bug concerning table and separator alignment of multi-line hash with multiple keys on the same line. ([@jonas054][])
- #550: Fix a bug where
ClassLength
counted lines of inner classes/modules. ([@yujinakayama][]) - ๐ #550: Fix a false positive for namespace class in
Documentation
. ([@yujinakayama][]) - ๐ #556: Fix "Parser::Source::Range spans more than one line" bug in clang formatter. ([@yujinakayama][])
- ๐ป #552:
RaiseArgs
allows exception constructor calls with more than one 1 argument. ([@bbatsov][])
- #551: New cop
-
v0.14.0 Changes
October 07, 2013๐ 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
-
v0.13.1 Changes
September 19, 2013๐ New features
HashSyntax
cop does auto-correction.- #484: Allow calls to self to fix name clash with argument.
- ๐ Renamed
SpaceAroundBraces
toSpaceAroundBlockBraces
. - ๐
SpaceAroundBlockBraces
now has aNoSpaceBeforeBlockParameters
config option to enforce a style for blocks with parameters like{|foo| puts }
. - ๐ New cop
LambdaCall
tracks uses of the obscurelambda.(...)
syntax.
๐ Bugs fixed
-
v0.13.0 Changes
September 13, 2013๐ 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
-
v0.12.0 Changes
August 23, 2013๐ 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
.
-
v0.11.1 Changes
August 12, 2013๐ Changes
- #425:
ColonMethodCalls
now allows constructor methods (likeNokogiri::HTML()
to be called with double colon.
๐ Bugs fixed
- #425:
-
v0.11.0 Changes
August 09, 2013๐ New features
- #421:
TrivialAccessors
now ignores methods on user-configurable whitelist (such asto_s
andto_hash
). - ๐ง #369: New option
--auto-gen-config
outputs RuboCop configuration that disables all cops that detect any offences. - ๐ง The list of annotation keywords recognized by the
CommentAnnotation
cop is now configurable. - ๐ง Configuration file names are printed as they are loaded in
--debug
mode. - ๐ Auto-correct support added in
AlignParameters
cop. - ๐ New cop
UselessComparison
checks for comparisons of the same arguments. - ๐ New cop
UselessAssignment
checks for useless assignments to local variables. - ๐ New cop
SignalException
checks for proper usage offail
andraise
. - ๐ New cop
ModuleFunction
checks for usage ofextend self
in modules.
๐ Bugs fixed
- ๐ #374: Fixed error at post condition loop (
begin-end-while
,begin-end-until
) inUnusedLocalVariable
andShadowingOuterLocalVariable
. - #373 and #376: Allow braces around multi-line blocks if
do
-end
would change the meaning of the code. - ๐
RedundantSelf
now allowsself.
followed by any ruby keyword. - #391: Fix bug in counting slashes in a regexp.
- #394:
DotPosition
cop handles correctly code likel.(1)
. - โก๏ธ #390:
CommentAnnotation
cop allows keywords (e.g. Review, Optimize) if they just begin a sentence. - #400: Fix bug concerning nested defs in
EmptyLineBetweenDefs
cop. - #399: Allow assignment inside blocks in
AssignmentInCondition
cop. - ๐ Fix bug in favor_modifier.rb regarding missed offences after else etc.
- ๐ #393: Retract support for multiline chaining of blocks (which fixed #346), thus rejecting issue 346.
- #389: Ignore symbols that are arguments to Module#private_constant in
SymbolName
cop. - #387: Do auto-correct in
AndOr
cop only if it does not change the meaning of the code. - #398: Don't display blank lines in the output of the clang formatter.
- #283: Refine
StringLiterals
string content check.
- #421:
-
v0.10.0 Changes
July 17, 2013๐ New features
- ๐ New cop
RedundantReturn
tracks redundantreturn
s in method bodies. - ๐ New cop
RedundantBegin
tracks redundantbegin
blocks in method definitions. - ๐ New cop
RedundantSelf
tracks redundant uses ofself
. - ๐ New cop
EmptyEnsure
tracks emptyensure
blocks. - ๐ New cop
CommentAnnotation
tracks formatting of annotation comments such as TODO. - โ Added custom rake task.
- ๐ New formatter
FileListFormatter
outputs just a list of files with offences in them (related to #357).
๐ Changes
TrivialAccessors
now has anExactNameMatch
config option (related to #308).TrivialAccessors
now has anExcludePredicates
config option (related to #326).- ๐ Cops don't inherit from
Parser::AST::Rewriter
anymore. All 3rd party Cops should remove the call tosuper
in their callbacks. If you implement your own processing you need to define the#investigate
method instead of#inspect
. Refer to the documentation ofCop::Commissioner
andCop::Cop
classes for more information. EndAlignment
cop split intoEndAlignment
andBlockAlignment
cops.
๐ Bugs fixed
- #288: Work with absolute Excludes paths internally (2nd fix for this issue).
TrivialAccessors
now detects class attributes as well as instance attributes.- #338: Fix end alignment of blocks in chained assignments.
- #345: Add
$SAFE
to the list of built-in global variables. - ๐ #340: Override config parameters rather than merging them.
- #349: Fix false positive for
CharacterLiteral
(%w(?)
). - ๐ #346: Support method chains for block end alignment checks.
- ๐ #350: Support line breaks between variables on left hand side for block end alignment checks.
- #356: Allow safe assignment in
ParenthesesAroundCondition
.
Misc
- ๐ Improved performance on Ruby 1.9 by about 20%.
- ๐ Improved overall performance by about 35%.
- ๐ New cop
-
v0.9.1 Changes
July 05, 2013๐ New features
- โ Added
-l/--lint
option to allow doing only linting with no style checks (similar to runningruby -wc
).
๐ Changes
- โ Removed the
BlockAlignSchema
configuration option fromEndAlignment
. We now support only the default alignment schema -StartOfAssignment
. - ๐ง Made the preferred collection methods in
CollectionMethods
configurable. - ๐
Made the
DotPosition
cop configurable - now bothleading
andtrailing
styles are supported.
๐ Bugs fixed
- #318: Correct some special cases of block end alignment.
- #317: Fix a false positive in
LiteralInCondition
. - #321: Ignore variables whose name start with
_
inShadowingOuterLocalVariable
. - ๐ป #322: Fix exception of
UnusedLocalVariable
andShadowingOuterLocalVariable
when inspecting keyword splat argument. - #316: Correct nested postfix unless in
MultilineIfThen
. - #327: Fix false offences for block expression that span on two lines in
EndAlignment
. - ๐ป #332: Fix exception of
UnusedLocalVariable
andShadowingOuterLocalVariable
when inspecting named captures. - ๐ป #333: Fix a case that
EnsureReturn
throws an exception when ensure has no body.
- โ Added