Rubocop v0.13.0 Release Notes

Release Date: 2013-09-13 // over 10 years ago
  • ๐Ÿ†• 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).