Rubocop v0.43.0 Release Notes
Release Date: 2016-09-19 // over 7 years ago-
๐ New features
- #3379: Add table of contents at the beginning of HTML formatted output. ([@hedgesky][])
- ๐ #2968: Add new
Style/DocumentationMethod
cop. ([@sooyang][]) - ๐ #3360: Add
RequireForNonPublicMethods
configuration option toStyle/DocumentationMethod
cop. ([@drenmi][]) - โ Add new
Rails/SafeNavigation
cop to converttry!
to&.
. ([@rrosenblum][]) - ๐
#3415: Add new
Rails/NotNullColumn
cop. ([@pocke][]) - ๐
#3167: Add new
Style/VariableNumber
cop. ([@sooyang][]) - Add new style
no_mixed_keys
toStyle/HashSyntax
to only check for hashes with mixed keys. ([@daviddavis][]) - ๐ Allow including multiple configuration files from a single gem. ([@tjwallace][])
- โ Add check for
persisted?
method call when using a create method inRails/SaveBang
. ([@QuinnHarris][]) - โ Add new
Style/SafeNavigation
cop to convert method calls safeguarded by a nonnil
check for the object to&.
. ([@rrosenblum][]) - โ Add new
Performance/SortWithBlock
cop to usesort_by(&:foo)
instead ofsort { |a, b| a.foo <=> b.foo }
. ([@koic][]) - #3492: Add new
UnifiedInteger
cop. ([@pocke][])
๐ Bug fixes
- ๐
#3383: Fix the local variable reset issue with
Style/RedundantSelf
cop. ([@bankair][]) - ๐
#3445: Fix bad auto-correct for
Style/AndOr
cop. ([@mikezter][]) - ๐
#3349: Fix bad auto-correct for
Style/Lambda
cop. ([@metcalf][]) - ๐ #3351: Fix bad auto-correct for
Performance/RedundantMatch
cop. ([@annaswims][]) - ๐
#3347: Prevent infinite loop in
Style/TernaryParentheses
cop when used together withStyle/RedundantParentheses
. ([@drenmi][]) - ๐
#3209: Remove faulty line length check from
Style/GuardClause
cop. ([@drenmi][]) - ๐
#3366: Make
Style/MutableConstant
cop aware of splat assignments. ([@drenmi][]) - ๐
#3372: Fix RuboCop crash with empty brackets in
Style/Next
cop. ([@pocke][]) - ๐
#3358: Make
Style/MethodMissing
cop aware of class scope. ([@drenmi][]) - ๐ #3342: Fix error in
Lint/ShadowedException
cop if last rescue does not have parameter. ([@soutaro][]) - ๐
#3380: Fix false positive in
Style/TrailingUnderscoreVariable
cop. ([@drenmi][]) - ๐ #3388: Fix bug where
Lint/ShadowedException
would register an offense when rescuing different numbers of custom exceptions in multiple rescue groups. ([@rrosenblum][]) - #3386: Make
VariableForce
understand an empty RegExp literal as LHS to=~
. ([@drenmi][]) - #3421: Fix clobbering
inherit_from
additions when not using Namespaces in the configs. ([@nicklamuro][]) - ๐ #3425: Fix bug for invalid bytes in UTF-8 in
Lint/PercentStringArray
cop. ([@pocke][]) - ๐ง #3374: Make
SpaceInsideBlockBraces
andSpaceBeforeBlockBraces
not depend onBlockDelimiters
configuration. ([@jonas054][]) - ๐ Fix error in
Lint/ShadowedException
cop for higher number of rescue groups. ([@groddeck][]) - ๐
#3456: Don't crash on a multiline empty brace in
Style/MultilineMethodCallBraceLayout
. ([@pocke][]) - ๐ #3423: Checks if .rubocop is a file before parsing. ([@joejuzl][])
- ๐
#3439: Fix variable assignment check not working properly when a block is used in
Rails/SaveBang
. ([@QuinnHarris][]) - ๐
#3401: Read file contents in binary mode so
Style/EndOfLine
works on Windows. ([@jonas054][]) - ๐
#3450: Prevent
Style/TernaryParentheses
cop from making unsafe corrections. ([@drenmi][]) - ๐
#3460: Fix false positives in
Style/InlineComment
cop. ([@drenmi][]) - #3485: Make OneLineConditional cop not register offense for empty else. ([@tejasbubane][])
- ๐
#3508: Fix false negatives in
Rails/NotNullColumn
. ([@pocke][]) - #3462: Don't create MultilineMethodCallBraceLayout offenses for single-line method calls when receiver spans multiple lines. ([@maxjacobson][])
๐ Changes
- ๐
#3341: Exclude RSpec tests from inspection by
Style/NumericPredicate
cop. ([@drenmi][]) - ๐ Rename
Lint/UselessArraySplat
toLint/UnneededSplatExpansion
, and add functionality to check for unnecessary expansion of other literals. ([@rrosenblum][]) - ๐ No longer register an offense for splat expansion of an array literal in
Performance/CaseWhenSplat
.Lint/UnneededSplatExpansion
now handles this behavior. ([@rrosenblum][]) - ๐
Lint/InheritException
restricts inheriting from standard library subclasses ofException
. ([@metcalf][]) - ๐
No longer register an offense if the first line of code starts with
#\
inStyle/LeadingCommentSpace
.config.ru
files consider such lines as options. ([@scottohara][]) - ๐ #3292: Remove
Performance/PushSplat
as it can produce code that is slower or even cause failure. ([@jonas054][])