Rubocop v0.15.0 Release Notes

Release Date: 2013-11-06 // over 10 years ago
  • ๐Ÿ†• 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][])