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 forself.()
. ([@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
andhtml_safe
methods inRails/OutputSafety
. ([@lumeet][]) - ๐
Redundant return style now properly handles empty
when
blocks. ([@albus522][]) - #3622: Fix false positive for
Metrics/MethodLength
andMetrics/BlockLength
. ([@meganemura][]) - #3625: Fix some cops errors when condition is empty brace. ([@pocke][])
- ๐
#3468: Fix bug regarding alignment inside
begin
..end
block inStyle/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 inStyle/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 thatreduce
andinject
use the variable namesa
ande
for block arguments. These defaults are uncommunicative variable names and thus conflict with the "Uncommunicative Variable Name" check in Reek. Default args changed toacc
andelem
.([@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][])
- ๐ #3615: Add auto-correction for