dep: bump rubocop from 1.39.0 to 1.40.0
Bumps rubocop from 1.39.0 to 1.40.0.
Release notes
Sourced from rubocop's releases.
RuboCop 1.40
New features
- #11179: Add
Style/RedundantConstantBase
cop. (@r7kamura
)- #11205: Add
--[no-]auto-gen-enforced-style
CLI option. (@ydah
)- #11224: Add
Style/RequireOrder
cop. (@r7kamura
)- #11219: Make
Style/SelectByRegexp
aware of!~
method. (@koic
)- #11224: Add new cop
Style/ArrayIntersect
which replaces(array1 & array2).any?
witharray1.intersect?(array2)
, methodArray#intersect?
was added in ruby 3.1. (@KirIgor
)- #11211: Add autocorrect for
Lint/AssignmentInCondition
. (@r7kamura
)Bug fixes
- #5251: Fix loading of configuration in multi-file edge case. (
@NobodysNightmare
)- #11192: Fix a false positive for
Lint/ParenthesesAsGroupedExpression
when using a block argument. (@ydah
)- #11143: Fix RedundantCopDisableDirective errors when encountering several department comments. (
@isarcasm
)- #11230: Fix an incorrect autocorrect for
Lint/SafeNavigationChain
when using safe navigation with[]
operator followed by method chain. (@koic
)- #11181: Fix pattern to match .tool-versions files that specify multiple runtimes. (
@noelblaschke
)- #11239: Fix an incorrect autocorrect for
Style/GuardClause
when using heredoc as an argument of raise in branch body. (@koic
)- #11182: Fix an incorrect autocorrect for
EnforcedShorthandSyntax: always
ofStyle/HashSyntax
withStyle/IfUnlessModifier
when using Ruby 3.1. (@koic
)- #11184: Fix an error for
Lint/ShadowingOuterLocalVariable
when a block local variable has same name as an outeruntil
scope variable. (@koic
)- #11198: Fix an error for
Lint/EmptyConditionalBody
when one using line if/;/end without then boby. (@koic
)- #11196: Fix a false positive for
Style/GuardClause
when usingraise
inthen
body ofif..elsif..end
form. (@koic
)- #11213: Support redundant department disable in scope of
Lint/RedundantCopDisableDirective
cop. (@isarcasm
)- #11200: Fix an incorrect autocorrect for
Layout/MultilineMethodCallBraceLayout
when using method chain for heredoc argument in multiline literal brace layout. (@koic
)- #11190: Fix an error for
Style/IfWithSemicolon
when using one line if/;/end without then boby. (@koic
)- #11244: Fix a false negative for
Style/RedundantReturn
when dynamic define methods. (@ydah
)Changes
- #11218: Update severity of
Bundler/DuplicatedGem
,Bundler/InsecureProtocolSource
,Gemspec/DeprecatedAttributeAssignment
,Gemspec/DuplicatedAssignment
,Gemspec/RequireMFA
,Gemspec/RequiredRubyVersion
, andGemspec/RubyVersionGlobalsUsage
cops to warning. (@koic
)- #11222: Make
Style/RedundantArgument
aware ofArray#sum
. (@koic
)- #11070: Add ability to count method calls as one line to code length related
Metric
cops. (@fatkodima
)- #11226: Make
Lint/Void
aware of used lambda and proc in void context. (@koic
)- #11205: Change
Lint/InterpolationCheck
fromSafe: false
toSafeAutoCorrect: false
. (@r7kamura
)- #11212: Make
Lint/DeprecatedConstants
aware of deprecatedStruct::Group
andStruct::Passwd
classes. (@koic
)- #11236: Remove
respond_to
from default value ofAllowedMethods
forStyle/SymbolProc
. (@koic
)- #11185: Make
Style/HashSyntax
aware of without parentheses call expr follows. (@koic
)- #11203: Support multiple arguments on
Lint/SendWithMixinArgument
. (@r7kamura
)- #11229: Add
cc
toAllowedNames
ofMethodParameterName
cop. (@tjschuck
)- #11116: Handle ternaries in
Style/SafeNavigation
. (@fatkodima
)
Changelog
Sourced from rubocop's changelog.
1.40.0 (2022-12-08)
New features
- #11179: Add
Style/RedundantConstantBase
cop. ([@r7kamura
][])- #11205: Add
--[no-]auto-gen-enforced-style
CLI option. ([@ydah
][])- #11224: Add
Style/RequireOrder
cop. ([@r7kamura
][])- #11219: Make
Style/SelectByRegexp
aware of!~
method. ([@koic
][])- #11224: Add new cop
Style/ArrayIntersect
which replaces(array1 & array2).any?
witharray1.intersect?(array2)
, methodArray#intersect?
was added in ruby 3.1. ([@KirIgor
][])- #11211: Add autocorrect for
Lint/AssignmentInCondition
. ([@r7kamura
][])Bug fixes
- #5251: Fix loading of configuration in multi-file edge case. ([
@NobodysNightmare
][])- #11192: Fix a false positive for
Lint/ParenthesesAsGroupedExpression
when using a block argument. ([@ydah
][])- #11143: Fix RedundantCopDisableDirective errors when encountering several department comments. ([
@isarcasm
][])- #11230: Fix an incorrect autocorrect for
Lint/SafeNavigationChain
when using safe navigation with[]
operator followed by method chain. ([@koic
][])- #11181: Fix pattern to match .tool-versions files that specify multiple runtimes. ([
@noelblaschke
][])- #11239: Fix an incorrect autocorrect for
Style/GuardClause
when using heredoc as an argument of raise in branch body. ([@koic
][])- #11182: Fix an incorrect autocorrect for
EnforcedShorthandSyntax: always
ofStyle/HashSyntax
withStyle/IfUnlessModifier
when using Ruby 3.1. ([@koic
][])- #11184: Fix an error for
Lint/ShadowingOuterLocalVariable
when a block local variable has same name as an outeruntil
scope variable. ([@koic
][])- #11198: Fix an error for
Lint/EmptyConditionalBody
when one using line if/;/end without then boby. ([@koic
][])- #11196: Fix a false positive for
Style/GuardClause
when usingraise
inthen
body ofif..elsif..end
form. ([@koic
][])- #11213: Support redundant department disable in scope of
Lint/RedundantCopDisableDirective
cop. ([@isarcasm
][])- #11200: Fix an incorrect autocorrect for
Layout/MultilineMethodCallBraceLayout
when using method chain for heredoc argument in multiline literal brace layout. ([@koic
][])- #11190: Fix an error for
Style/IfWithSemicolon
when using one line if/;/end without then boby. ([@koic
][])- #11244: Fix a false negative for
Style/RedundantReturn
when dynamic define methods. ([@ydah
][])Changes
- #11218: Update severity of
Bundler/DuplicatedGem
,Bundler/InsecureProtocolSource
,Gemspec/DeprecatedAttributeAssignment
,Gemspec/DuplicatedAssignment
,Gemspec/RequireMFA
,Gemspec/RequiredRubyVersion
, andGemspec/RubyVersionGlobalsUsage
cops to warning. ([@koic
][])- #11222: Make
Style/RedundantArgument
aware ofArray#sum
. ([@koic
][])- #11070: Add ability to count method calls as one line to code length related
Metric
cops. ([@fatkodima
][])- #11226: Make
Lint/Void
aware of used lambda and proc in void context. ([@koic
][])- #11205: Change
Lint/InterpolationCheck
fromSafe: false
toSafeAutoCorrect: false
. ([@r7kamura
][])- #11212: Make
Lint/DeprecatedConstants
aware of deprecatedStruct::Group
andStruct::Passwd
classes. ([@koic
][])- #11236: Remove
respond_to
from default value ofAllowedMethods
forStyle/SymbolProc
. ([@koic
][])- #11185: Make
Style/HashSyntax
aware of without parentheses call expr follows. ([@koic
][])- #11203: Support multiple arguments on
Lint/SendWithMixinArgument
. ([@r7kamura
][])- #11229: Add
cc
toAllowedNames
ofMethodParameterName
cop. ([@tjschuck
][])- #11116: Handle ternaries in
Style/SafeNavigation
. ([@fatkodima
][])
Commits
-
9c682a5
Cut 1.40 -
e7080e8
Update Changelog -
54bd547
Optimize checking if the file is relevant for the cop -
7aa43c2
Merge pull request #11248 from ydah/fix/typos -
a538c4a
Fix a typo for CHANGELOG entry -
9c27f87
Merge pull request #11245 from ydah/fix/11244 -
8619545
[Fix #11244] Fix a false negative forStyle/RedundantReturn
when dynamic de... -
52eaa84
[Fix #11239] Fix an incorrect autocorrect forStyle/GuardClause
-
e46f92d
Update examples and doc -
88f1193
Update example - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
@dependabot-bot rebase
will rebase this MR -
@dependabot-bot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts
Allure report
allure-report-publisher
generated test report!
rspec:
+------------------------------------------------------------------+
| behaviors summary |
+-------------+--------+--------+---------+-------+-------+--------+
| | passed | failed | skipped | flaky | total | result |
+-------------+--------+--------+---------+-------+-------+--------+
| services | 181 | 0 | 0 | 0 | 181 | ✅ |
| controllers | 25 | 0 | 0 | 0 | 25 | ✅ |
| jobs | 14 | 0 | 0 | 0 | 14 | ✅ |
| models | 4 | 0 | 0 | 0 | 4 | ✅ |
| system | 10 | 0 | 0 | 0 | 10 | ✅ |
| tasks | 9 | 0 | 0 | 0 | 9 | ✅ |
+-------------+--------+--------+---------+-------+-------+--------+
| Total | 243 | 0 | 0 | 0 | 243 | ✅ |
+-------------+--------+--------+---------+-------+-------+--------+
Edited by George Koltsov