All Versions
151
Latest Version
Avg Release Cycle
7 days
Latest Release
790 days ago

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 values space and no_space (default) added to SpaceAroundBlockBraces. ([@jonas054][])
    • 0๏ธโƒฃ #603: New parameter MinSize added to WordArray 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 the EnforcedStyle option. ([@sds][])
    • Split AccessControl cop to AccessModifierIndentation and EmptyLinesAroundAccessModifier. ([@bbatsov][])
    • ๐Ÿ’… #594: Add configuration parameter EnforcedStyleForEmptyBraces to SpaceInsideHashLiteralBraces cop, and change EnforcedStyleIsWithSpaces (values true, false) to EnforcedStyle (values space, 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 the CharacterLiterals 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) in FavorModifier. ([@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 an instance_exec. ([@bbatsov][])
    • #554: Handle properly multi-line arrays with comments in them in WordArray. ([@bbatsov][])
  • 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][])
  • v0.14.0 Changes

    October 07, 2013

    ๐Ÿ†• New features

    • #491: New cop MethodCalledOnDoEndBlock keeps track of methods called on do...end blocks.
    • ๐Ÿ”ง #456: New configuration parameter AllCops/RunRailsCops can be set to true for a project, removing the need to give the -R/--rails option with every invocation of rubocop.
    • ๐Ÿ–จ #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 outputs corrected 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 like raise RuntimeError, message.
    • #526: New cop RaiseArgs checks the args passed to raise/fail.

    ๐Ÿ”„ Changes

    • ๐Ÿ’… Cop MethodAndVariableSnakeCase replaced by MethodName and VariableName, both having the configuration parameter EnforcedStyle with values snake_case (default) and camelCase.
    • ๐Ÿ”ง #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 a return 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 of raise or fail.
    • ๐Ÿ”ง LambdaCall is now configurable and enforce either Proc#call or Proc#().
    • ๐Ÿ’… #529: Added config option EnforcedStyle to SpaceAroundBraces.
    • #529: Changed config option NoSpaceBeforeBlockParameters to SpaceBeforeBlockParameters.
    • ๐Ÿ‘Œ 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 is table for '=>' and separator 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 with warning 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 and AlignArray auto-correction to destroy code.
    • #516: Fix bug causing RedundantReturn auto-correction to produce invalid code.
    • #527: Handle != expressions in EvenOdd cop.
    • ๐Ÿšฆ SignalException cop now finds raise calls anywhere, not only in begin sections.
    • #538: Fix bug causing Blocks auto-correction to produce invalid code.
  • 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 to SpaceAroundBlockBraces.
    • ๐Ÿ’… SpaceAroundBlockBraces now has a NoSpaceBeforeBlockParameters config option to enforce a style for blocks with parameters like {|foo| puts }.
    • ๐Ÿ†• New cop LambdaCall tracks uses of the obscure lambda.(...) syntax.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  Fix crash on empty input file in FinalNewline.
    • #485: Fix crash on multiple-assignment and op-assignment in UselessSetterCall.
    • #497: Fix crash in UselessComparison and NilComparison.
  • v0.13.0 Changes

    September 13, 2013

    ๐Ÿ†• New features

    • ๐Ÿ†• New configuration parameter AllowAdjacentOneLineDefs for EmptyLineBetweenDefs.
    • ๐Ÿ†• 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 and SpaceAroundBraces cops.

    ๐Ÿ”„ Changes

    • #447: BlockAlignment cop now allows end to be aligned with the start of the line containing do.
    • SymbolName now has an AllowDots config option to allow symbols like :'whatever.submit_button'.
    • #469: Extracted useless setter call tracking part of UselessAssignment cop to UselessSetterCall.
    • ๐Ÿ”€ #469: Merged UnusedLocalVariable cop into UselessAssignment.
    • ๐Ÿ”€ #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 to AvoidGlobalVars to allow users to whitelist certain global variables.
    • ๐Ÿ“‡ Renamed AvoidGlobalVars to GlobalVars.
    • ๐Ÿ“‡ Renamed AvoidPerlisms to SpecialGlobalVars.
    • ๐Ÿ“‡ Renamed AvoidFor to For.
    • ๐Ÿ“‡ Renamed AvoidClassVars to ClassVars.
    • ๐Ÿ“‡ Renamed AvoidPerlBackrefs to PerlBackrefs.
    • NumericLiterals now accepts a config param MinDigits - 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 with WhileUntilDo 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 of UnusedLocalVariable) and ShadowingOuterLocalVariable (like clazz = Array; class SomeClass < clazz; end).
    • #463: Do not warn if using destructuring in second reduce argument (ReduceArguments).
  • 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 where Fixnum#even? or Fixnum#odd? should have been used (like x % 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 deprecated Hash methods.
    • New Rails cop HasAndBelongsToMany checks for uses of has_and_belongs_to_many.
    • ๐Ÿ†• New Rails cop ReadAttribute tracks uses of read_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. Now progress/simple/clang formatters always report summary and emacs/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 in AccessControl.
    • ๐Ÿ›  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 (like Nokogiri::HTML() to be called with double colon.

    ๐Ÿ› Bugs fixed

    • #427: FavorUnlessOverNegatedIf triggered when using elsifs.
    • #429: Fix LeadingCommentSpace offence reporting.
    • ๐Ÿ›  Fixed AsciiComments offence reporting.
    • ๐Ÿ›  Fixed BlockComments offence reporting.
  • v0.11.0 Changes

    August 09, 2013

    ๐Ÿ†• New features

    • #421: TrivialAccessors now ignores methods on user-configurable whitelist (such as to_s and to_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 of fail and raise.
    • ๐Ÿ†• New cop ModuleFunction checks for usage of extend self in modules.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  #374: Fixed error at post condition loop (begin-end-while, begin-end-until) in UnusedLocalVariable and ShadowingOuterLocalVariable.
    • #373 and #376: Allow braces around multi-line blocks if do-end would change the meaning of the code.
    • ๐Ÿ’Ž RedundantSelf now allows self. followed by any ruby keyword.
    • #391: Fix bug in counting slashes in a regexp.
    • #394: DotPosition cop handles correctly code like l.(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.
  • v0.10.0 Changes

    July 17, 2013

    ๐Ÿ†• New features

    • ๐Ÿ†• New cop RedundantReturn tracks redundant returns in method bodies.
    • ๐Ÿ†• New cop RedundantBegin tracks redundant begin blocks in method definitions.
    • ๐Ÿ†• New cop RedundantSelf tracks redundant uses of self.
    • ๐Ÿ†• New cop EmptyEnsure tracks empty ensure 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 an ExactNameMatch config option (related to #308).
    • TrivialAccessors now has an ExcludePredicates config option (related to #326).
    • ๐Ÿ“š Cops don't inherit from Parser::AST::Rewriter anymore. All 3rd party Cops should remove the call to super in their callbacks. If you implement your own processing you need to define the #investigate method instead of #inspect. Refer to the documentation of Cop::Commissioner and Cop::Cop classes for more information.
    • EndAlignment cop split into EndAlignment and BlockAlignment 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%.
  • v0.9.1 Changes

    July 05, 2013

    ๐Ÿ†• New features

    • โž• Added -l/--lint option to allow doing only linting with no style checks (similar to running ruby -wc).

    ๐Ÿ”„ Changes

    • โœ‚ Removed the BlockAlignSchema configuration option from EndAlignment. We now support only the default alignment schema - StartOfAssignment.
    • ๐Ÿ”ง Made the preferred collection methods in CollectionMethods configurable.
    • ๐Ÿ’… Made the DotPosition cop configurable - now both leading and trailing 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 _ in ShadowingOuterLocalVariable.
    • ๐Ÿ‘ป #322: Fix exception of UnusedLocalVariable and ShadowingOuterLocalVariable 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 and ShadowingOuterLocalVariable when inspecting named captures.
    • ๐Ÿ‘ป #333: Fix a case that EnsureReturn throws an exception when ensure has no body.