Rubocop v0.87.0 Release Notes
Release Date: 2020-07-06 // almost 4 years ago-
๐ New features
- #7868:
Cop::Base
is the new recommended base class for cops. (@marcandre) - ๐
#3983: Add new
Style/AccessorGrouping
cop. (@fatkodima) - ๐
#8244: Add new
Style/BisectedAttrAccessor
cop. (@fatkodima) - #7458: Add new
AsciiConstants
option forNaming/AsciiIdentifiers
. (@fatkodima) - ๐
#7373: Add new
Style/RedundantAssignment
cop. (@fatkodima) - ๐ #8213: Permit to specify TargetRubyVersion 2.8 (experimental). (@koic)
- #8159: Add new
CountAsOne
option for code length relatedMetric
cops. (@fatkodima) - ๐ #8164: Support auto-correction for
Lint/InterpolationCheck
. (@koic) - ๐
#8223: Support auto-correction for
Style/IfUnlessModifierOfIfUnless
. (@koic) - ๐ #8172: Support auto-correction for
Lint/SafeNavigationWithEmpty
. (@koic)
๐ Bug fixes
- ๐ #8039: Fix false positives for
Lint/ParenthesesAsGroupedExpression
in when using operators or chain functions. (@CamilleDrapier) - ๐
#8196: Fix a false positive for
Style/RedundantFetchBlock
when using withRails.cache
. (@fatkodima) - ๐
#8195: Fix an error for
Style/RedundantFetchBlock
when using#fetch
with empty block. (@koic) - ๐
#8193: Fix a false positive for
Style/RedundantRegexpCharacterClass
when using[\b]
. (@owst) - ๐
#8205: Fix a false positive for
Style/RedundantRegexpCharacterClass
when using a leading escaped]
. (@owst) - ๐
#8208: Fix
Style/RedundantParentheses
with hash literal as first argument toyield
. (@karlwithak) - ๐ง #8176: Don't load
.rubocop.yml
from personal folders to check for exclusions if there's a project configuration. (@deivid-rodriguez)
๐ Changes
- #7868: (Breaking) Extensive refactoring of internal classes
Team
,Commissioner
,Corrector
.Cop::Cop#corrections
not completely compatible. See Upgrade Notes. (@marcandre) - #8156: (Breaking)
rubocop -a / --autocorrect
no longer run unsafe corrections;rubocop -A / --autocorrect-all
run both safe and unsafe corrections. Options--safe-autocorrect
is deprecated. (@marcandre) - #8207: (Breaking) Order for gems names now disregards underscores and dashes unless
ConsiderPunctuation
setting is set totrue
. (@marcandre) - #8211:
Style/ClassVars
cop now detectsclass_variable_set
. (@biinari) - #8245: Detect top-level constants like
::Const
in various cops. (@biinari)
- #7868: