Rubocop v0.45.0 Release Notes

Release Date: 2016-10-31 // over 7 years ago
  • ๐Ÿ†• New features

    • ๐Ÿ‘• #3615: Add auto-correction for Lint/EmptyInterpolation. ([@pocke][])
    • ๐Ÿ‘‰ Make PercentLiteralDelimiters enforce delimiters around %I() too. ([@bronson][])
    • #3408: Add check for repeated values in case conditionals. ([@swcraig][])
    • ๐Ÿ‘• #3646: Add new Lint/EmptyWhen cop. ([@drenmi][])
    • #3246: Add list of all cops to the manual (generated automatically from a rake task). ([@sihu][])
    • 0๏ธโƒฃ #3647: Add --force-default-config option. ([@jawshooah][])
    • #3570: Add new MultilineIfModifier cop to avoid usage of if/unless-modifiers on multiline statements. ([@tessi][])
    • ๐Ÿ’… #3631: Add new Style/SpaceInLambdaLiteral cop to check for spaces in lambda literals. ([@swcraig][])
    • โž• Add new Lint/EmptyExpression cop. ([@drenmi][])

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #3553: Make Style/RedundantSelf cop to not register an offence for self.(). ([@iGEL][])
    • ๐Ÿš… #3474: Make the Rails/TimeZone only analyze functions which have "Time" in the receiver. ([@b-t-g][])
    • ๐Ÿ’… #3607: Fix Style/RedundantReturn cop for empty if body. ([@pocke][])
    • ๐Ÿš… #3291: Improve detection of raw and html_safe methods in Rails/OutputSafety. ([@lumeet][])
    • ๐Ÿ’… Redundant return style now properly handles empty when blocks. ([@albus522][])
    • #3622: Fix false positive for Metrics/MethodLength and Metrics/BlockLength. ([@meganemura][])
    • #3625: Fix some cops errors when condition is empty brace. ([@pocke][])
    • ๐Ÿ’… #3468: Fix bug regarding alignment inside begin..end block in Style/MultilineMethodCallIndentation. ([@jonas054][])
    • ๐Ÿ“š #3644: Fix generation incorrect documentation. ([@pocke][])
    • ๐Ÿ’… #3637: Fix Style/NonNilCheck crashing for ternary condition. ([@tejasbubane][])
    • ๐Ÿš… #3654: Add missing keywords for Rails/HttpPositionalArguments. ([@eitoball][])
    • ๐Ÿš… #3652: Avoid crash Rails/HttpPositionalArguments for lvar params when auto-correct. ([@pocke][])
    • ๐Ÿ›  Fix bug in Style/SafeNavigation where there is a check for an object in an elsif statement with a method call on that object in the branch. ([@rrosenblum][])
    • ๐Ÿš… #3660: Fix false positive for Rails/SafeNavigation when without receiver. ([@pocke][])
    • ๐Ÿ’… #3650: Fix Style/VariableNumber registering an offense for variables with double digit numbers. ([@rrosenblum][])
    • ๐Ÿ’… #3494: Check rails style indentation also inside blocks in Style/IndentationWidth. ([@jonas054][])
    • #3676: Ignore raw and html_safe invocations when wrapped inside a safe_join. ([@b-t-g][])

    ๐Ÿ”„ Changes

    • ๐Ÿ’… #3601: Change default args for Style/SingleLineBlockParams. This cop checks that reduce and inject use the variable names a and e for block arguments. These defaults are uncommunicative variable names and thus conflict with the "Uncommunicative Variable Name" check in Reek. Default args changed to acc and elem.([@jessieay][])
    • ๐Ÿ’… #3645: Fix bug with empty case when nodes in Style/RedundantReturn. ([@tiagocasanovapt][])
    • ๐Ÿ’… #3263: Fix auto-correct of if statements inside of unless else statements in Style/ConditionalAssignment. ([@rrosenblum][])
    • โฌ†๏ธ Bump default Ruby version to 2.1. ([@drenmi][])