Rubocop v0.9.0 Release Notes

Release Date: 2013-07-01 // almost 11 years ago
  • ๐Ÿ†• New features

    • Introduced formatter feature, enables custom formatted output and multiple outputs.
    • โž• Added progress formatter and now it's the default. (--format progress).
    • โž• Added JSON formatter. (--format json).
    • โž• Added clang style formatter showing the offending source. code. (--format clang). The clang formatter marks a whole range rather than just the starting position, to indicate more clearly where the problem is.
    • โž• Added -f/--format option to specify formatter.
    • โž• Added -o/--out option to specify output file for each formatter.
    • โž• Added -r/--require option to inject external Ruby code into RuboCop.
    • โž• Added -V/--verbose-version option that displays Parser version and Ruby version as well.
    • โž• Added -R/--rails option that enables extra Rails-specific cops.
    • โž• Added support for auto-correction of some offences with -a/--auto-correct.
    • ๐Ÿ†• New cop CaseEquality checks for explicit use of ===.
    • ๐Ÿ†• New cop AssignmentInCondition checks for assignment in conditions.
    • ๐Ÿ†• New cop EndAlignment tracks misaligned end keywords.
    • ๐Ÿ†• New cop Void tracks uses of literals/variables/operators in possibly void context.
    • ๐Ÿ†• New cop Documentation checks for top level class/module doc comments.
    • ๐Ÿ†• New cop UnreachableCode tracks unreachable code segments.
    • ๐Ÿ†• New cop MethodCallParentheses tracks unwanted braces in method calls.
    • ๐Ÿ†• New cop UnusedLocalVariable tracks unused local variables for each scope.
    • ๐Ÿ†• New cop ShadowingOuterLocalVariable tracks use of the same name as outer local variables for block arguments or block local variables.
    • ๐Ÿ†• New cop WhileUntilDo tracks uses of do with multi-line while/until.
    • ๐Ÿ†• New cop CharacterLiteral tracks uses of character literals (?x).
    • ๐Ÿ†• New cop EndInMethod tracks uses of END in method definitions.
    • ๐Ÿ†• New cop LiteralInCondition tracks uses of literals in the conditions of if/while/until.
    • ๐Ÿ†• New cop BeginBlock tracks uses of BEGIN blocks.
    • ๐Ÿ†• New cop EndBlock tracks uses of END blocks.
    • ๐Ÿ†• New cop DotPosition tracks the dot position in multi-line method calls.
    • ๐Ÿ†• New cop Attr tracks uses of Module#attr.
    • โž• Add support for auto-correction of some offences with -a/--auto-correct.

    ๐Ÿ”„ Changes

    • ๐Ÿ—„ Deprecated -e/--emacs option. (Use --format emacs instead).
    • 0๏ธโƒฃ Made progress formatter the default.
    • ๐Ÿ–จ Most formatters (progress, simple and clang) now print relative file paths if the paths are under the current working directory.
    • ๐Ÿ’… Migrate all cops to new namespaces. Rubocop::Cop::Lint is for cops that emit warnings. Rubocop::Cop::Style is for cops that do not belong in other namespaces.
    • ๐Ÿ”ง Merge FavorPercentR and PercentR into one cop called RegexpLiteral, and add configuration parameter MaxSlashes.
    • โž• Add CountKeywordArgs configuration option to ParameterLists cop.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  #239: Fixed double quotes false positives.
    • #233: Report syntax cop offences.
    • ๐Ÿ›  Fix off-by-one error in favor_modifier.
    • #229: Recognize a line with CR+LF as a blank line in AccessControl cop.
    • #235: Handle multiple constant assignment in ConstantName cop.
    • #246: Correct handling of unicode escapes within double quotes.
    • ๐Ÿ›  Fix crashes in Blocks, CaseEquality, CaseIndentation, ClassAndModuleCamelCase, ClassMethods, CollectionMethods, and ColonMethodCall.
    • #263: Do not check for space around operators called with method syntax.
    • #271: Always allow line breaks inside hash literal braces.
    • ๐Ÿ›  #270: Fixed a false positive in ParenthesesAroundCondition.
    • #288: Get config parameter AllCops/Excludes from highest config file in path.
    • #276: Let columns start at 1 instead of 0 in all output of column numbers.
    • #292: Don't check non-regular files (like sockets, etc).
    • ๐Ÿ›  Fix crashes in WordArray on arrays of character literals such as [?\r, ?\n].
    • ๐Ÿ›  Fix crashes in Documentation on empty modules.