Rubocop v1.5.0 Release Notes
Release Date: 2020-12-01 // over 3 years ago-
๐ New features
- ๐ #9112: Add new cop
Lint/UnexpectedBlockArity
. (@dvandersluis) - ๐ #9010:
Metrics/ParameterLists
supportsMaxOptionalParameters
config parameter. (@fatkodima) - ๐
#9114: Support auto-correction for
Style/SoleNestedConditional
. (@koic) - #8564:
Metrics/AbcSize
: Add optional discount for repeated "attributes". (@marcandre)
๐ Bug fixes
- ๐ #8820: Fixes
IfWithSemicolon
autocorrection whenelsif
is present. (@adrian-rivera, @dvandersluis) - ๐
#9113: Fix a false positive for
Style/MethodCallWithoutArgsParentheses
when assigning to a default argument with the same name. (@koic) - #9115: Fix a false positive for
Style/FirstArgumentIndentation
when argument has expected indent width and the method is preceded by splat forEnforcedStyle: consistent_relative_to_receiver
. (@koic) - ๐
#9128: Fix an incorrect auto-correct for
Style/ClassAndModuleChildren
when namespace is defined as a class in the same file. (@koic) - ๐
#9105: Fix an incorrect auto-correct for
Style/RedundantCondition
when using operator method inelse
. (@koic) - ๐ #9096: Fix #9095 use merged_config instead of config for pending new cop check. (@ThomasKoppensteiner)
- ๐
#8053: Fix an incorrect auto-correct for
Style/AndOr
whenor
precedesand
. (@koic) - #9097: Fix a false positive for
Layout/EmptyLinesAroundArguments
when blank line is inserted between method with arguments and receiver. (@koic)
๐ Changes
- #9122: Added tip message if any gems are loaded that have RuboCop extensions. (@dvandersluis)
- #9104: Preset some stdlib method names for
Naming/VariableNumber
. (@koic) - ๐
#9127: Update
Style/SymbolProc
to be aware of numblocks. (@dvandersluis) - โฌ๏ธ #9102: Upgrade regexp_parser to 2.0. (@knu)
- โก๏ธ #9100: Update
ConfigObsoletion
so that parameters can be deprecated but still accepted. (@dvandersluis) - โก๏ธ #9108: Update
Lint/UnmodifiedReduceAccumulator
to handle numblocks and more than 2 arguments. (@dvandersluis) - โก๏ธ #9098: Update
Metrics/BlockLength
andMetrics/MethodLength
to useIgnoredMethods
instead ofExcludedMethods
in configuration. The previous key is retained for backwards compatibility. (@dvandersluis) - โก๏ธ #9098: Update
IgnoredMethods
so that every cop that uses it will accept both strings and regexes in the configuration. (@dvandersluis)
- ๐ #9112: Add new cop