Rubocop v0.53.0 Release Notes
Release Date: 2018-03-05 // about 6 years ago-
๐ New features
- #3666: Add new
Naming/UncommunicativeBlockParamName
cop. ([@garettarrowood][]) - #3666: Add new
Naming/UncommunicativeMethodParamName
cop. ([@garettarrowood][]) - ๐ #5356: Add new
Lint/UnneededCopEnableDirective
cop. ([@garettarrowood][]) - ๐ #5248: Add new
Lint/BigDecimalNew
cop. ([@koic][]) - โ Add new
Style/TrailingBodyOnClass
cop. ([@garettarrowood][]) - โ Add new
Style/TrailingBodyOnModule
cop. ([@garettarrowood][]) - ๐
#3394: Add new
Style/TrailingCommaInArrayLiteral
cop. ([@garettarrowood][]) - ๐
#3394: Add new
Style/TrailingCommaInHashLiteral
cop. ([@garettarrowood][]) - ๐ #5319: Add new
Security/Open
cop. ([@mame][]) - โ Add
EnforcedStyleForEmptyBrackets
configuration toLayout/SpaceInsideReferenceBrackets
.([@garettarrowood][]) - ๐
#5050: Add auto-correction to
Style/ModuleFunction
. ([@garettarrowood][]) - #5358:
--no-auto-gen-timestamp
CLI option suppresses the inclusion of the date and time it was generated in auto-generated config. ([@dominicsayers][]) - #4274: Add new
Layout/EmptyComment
cop. ([@koic][]) - ๐ง #4477: Add new configuration directive:
inherit_mode
for merging arrays. ([@leklund][]) - 0๏ธโฃ #5532: Include
.axlsx
file by default. ([@georf][]) - ๐ #5490: Add new
Lint/OrderedMagicComments
cop. ([@koic][]) - ๐
#4008: Add new
Style/ExpandPathArguments
cop. ([@koic][]) - #4812: Add
beginning_only
andending_only
style options toLayout/EmptyLinesAroundClassBody
cop. ([@jmks][]) - 0๏ธโฃ #5591: Include
.arb
file by default. ([@deivid-rodriguez][]) - ๐ #5473: Use
gems.locked
orGemfile.lock
to determine the bestTargetRailsVersion
when it is not specified in the config. ([@roberts1000][]) - โ Add new
Naming/MemoizedInstanceVariableName
cop. ([@satyap][]) - ๐
#5376: Add new
Style/EmptyLineAfterGuardClause
cop. ([@unkmas][]) - โ Add new
Rails/ActiveRecordAliases
cop. ([@elebow][])
๐ Bug fixes
- #4105: Fix
Lint/IndentationWidth
whenLint/EndAlignment
is configured withstart_of_line
. ([@brandonweiss][]) - ๐ #5453: Fix erroneous downcase in
Performance/Casecmp
auto-correction. ([@walinga][]) - ๐
#5343: Fix offense detection in
Style/TrailingMethodEndStatement
. ([@garettarrowood][]) - ๐
#5334: Fix semicolon removal for
Style/TrailingBodyOnMethodDefinition
auto-correction. ([@garettarrowood][]) - #5350: Fix
Metric/LineLength
false offenses for URLs in double quotes. ([@garettarrowood][]) - #5333: Fix
Layout/EmptyLinesAroundArguments
false positives for inline access modifiers. ([@garettarrowood][]) - #5339: Fix
Layout/EmptyLinesAroundArguments
false positives for multiline heredoc arguments. ([@garettarrowood][]) - ๐
#5383: Fix
Rails/Presence
false detection of receiver for locally definedblank?
&present?
methods. ([@garettarrowood][]) - ๐ #5314: Fix false positives for
Lint/NestedPercentLiteral
when percent characters are nested. ([@asherkach][]) - ๐ #5357: Fix
Lint/InterpolationCheck
false positives on escaped interpolations. ([@pocke][]) - ๐
#5409: Fix multiline indent for
Style/SymbolArray
andStyle/WordArray
auto-correct. ([@flyerhzm][]) - ๐
#5393: Fix
Rails/Delegate
's false positive with a method call with arguments. ([@pocke][]) - ๐
#5348: Fix false positive for
Style/SafeNavigation
when safe guarding more comparison methods. ([@rrosenblum][]) - ๐
#4889: Auto-correcting
Style/SafeNavigation
will add safe navigation to all methods in a method chain. ([@rrosenblum][]) - ๐
#5287: Do not register an offense in
Style/SafeNavigation
if there is an unsafe method used in a method chain. ([@rrosenblum][]) - ๐
#5401: Fix
Style/RedundantReturn
to trigger when begin-end, rescue, and ensure blocks present. ([@asherkach][]) - ๐
#5426: Make
Rails/InverseOf
acceptinverse_of: nil
to opt-out. ([@wata727][]) - ๐
#5448: Improve
Rails/LexicallyScopedActionFilter
. ([@wata727][]) - ๐
#3947: Fix false positive for
Rails/FilePath
when usingRails.root.join
in string interpolation of argument. ([@koic][]) - ๐
#5479: Fix false positives for
Rails/Presence
when using withelsif
. ([@wata727][]) - ๐ #5427: Fix exception when executing from a different drive on Windows. ([@orgads][])
- #5429: Detect tabs other than indentation by
Layout/Tab
. ([@pocke][]) - ๐
#5496: Fix a false positive of
Style/FormatStringToken
with unrelatedformat
call. ([@pocke][]) - ๐
#5503: Fix
Rails/CreateTableWithTimestamps
false positive when usingto_proc
syntax. ([@wata727][]) - ๐ #5512: Improve
Lint/Void
to detectKernel#tap
as method that ignores the block's value. ([@untitaker][]) - ๐
#5520: Fix
Style/RedundantException
auto-correction does not keep parenthesization. ([@dpostorivo][]) - โก๏ธ #5524: Return the instance based on the new type when calls
RuboCop::AST::Node#updated
. ([@wata727][]) - ๐
#5527: Avoid behavior-changing corrections in
Style/SafeNavigation
. ([@jonas054][]) - ๐ #5539: Fix compilation error and ruby code generation when passing args to funcall and predicates. ([@Edouard-chin][])
- #4669: Use binary file contents for cache key so changing EOL characters invalidates the cache. ([@jonas054][])
- ๐ #3947: Fix false positive for
Performance::RegexpMatch
when usingMatchData
before guard clause. ([@koic][]) - ๐
#5515: Fix
Style/EmptyElse
auto-correct for nested if and case statements. ([@asherkach][]) - #5582: Fix
end
alignment for variable assignment with line break after=
inLayout/EndAlignment
. ([@jonas054][]) - ๐
#5602: Fix false positive for
Style/ColonMethodCall
when using Java package namespace. ([@koic][]) - ๐
#5603: Fix falsy offense for
Style/RedundantSelf
with pseudo variables. ([@pocke][]) - #5547: Fix auto-correction of of
Layout/BlockEndNewline
when there is top level code outside of a class. ([@rrosenblum][]) - ๐ #5599: Fix the suggestion being used by
Lint/NumberConversion
to use base 10 with Integer. ([@rrosenblum][]) - ๐
#5534: Fix
Style/EachWithObject
auto-correction leaves an empty line. ([@flyerhzm][]) - ๐ Fix
Layout/EmptyLinesAroundAccessModifier
false-negative when next string after access modifier started with end. ([@unkmas][])
๐ Changes
- ๐ #5589: Remove
Performance/HashEachMethods
cop as it no longer provides a performance benefit. ([@urbanautomaton][]) - ๐
#3394: Remove
Style/TrailingCommmaInLiteral
in favor of two new cops. ([@garettarrowood][]) - ๐ Rename
Lint/UnneededDisable
toLint/UnneededCopDisableDirective
. ([@garettarrowood][]) - #5365: Add
*.gemfile
to Bundler cop target. ([@sue445][]) - ๐ง #4477: Warn when user configuration overrides other user configuration. ([@jonas054][])
- ๐
#5240: Make
Style/StringHashKeys
to accepts environment variables. ([@pocke][]) - ๐ง #5395: Always exit 2 when specified configuration file does not exist. ([@pocke][])
- ๐ #5402: Remove undefined
ActiveSupport::TimeZone#strftime
method from defined dangerous methods ofRails/TimeZone
cop. ([@koic][]) - ๐ #4704: Move
Lint/EndAlignment
,Lint/DefEndAlignment
,Lint/BlockAlignment
, andLint/ConditionPosition
to theLayout
namespace. ([@bquorning][]) - #5283: Change file path output by
Formatter::JSONFormatter
from relative path to smart path. ([@koic][]) - ๐
Style/SafeNavigation
will now register an offense for methods thatnil
responds to. ([@rrosenblum][]) - 0๏ธโฃ #5542: Exclude
.git/
by default. ([@pocke][]) - ๐ Tell Read the Docs to build downloadable docs. ([@eostrom][])
- ๐
Change
Style/SafeNavigation
to no longer register an offense for method chains exceeding 2 methods. ([@rrosenblum][]) - โ Remove auto-correction from
Lint/SafeNavigationChain
. ([@rrosenblum][]) - ๐ Change the highlighting of
Lint/SafeNavigationChain
to highlight the entire method chain beyond the safe navigation portion. ([@rrosenblum][])
- #3666: Add new