nucore-open
nucore-open copied to clipboard
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/RedundantConstantBasecop. (@r7kamura)- #11205: Add
--[no-]auto-gen-enforced-styleCLI option. (@ydah)- #11224: Add
Style/RequireOrdercop. (@r7kamura)- #11219: Make
Style/SelectByRegexpaware of!~method. (@koic)- #11224: Add new cop
Style/ArrayIntersectwhich 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/ParenthesesAsGroupedExpressionwhen using a block argument. (@ydah)- #11143: Fix RedundantCopDisableDirective errors when encountering several department comments. (
@isarcasm)- #11230: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen 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/GuardClausewhen using heredoc as an argument of raise in branch body. (@koic)- #11182: Fix an incorrect autocorrect for
EnforcedShorthandSyntax: alwaysofStyle/HashSyntaxwithStyle/IfUnlessModifierwhen using Ruby 3.1. (@koic)- #11184: Fix an error for
Lint/ShadowingOuterLocalVariablewhen a block local variable has same name as an outeruntilscope variable. (@koic)- #11198: Fix an error for
Lint/EmptyConditionalBodywhen one using line if/;/end without then boby. (@koic)- #11196: Fix a false positive for
Style/GuardClausewhen usingraiseinthenbody ofif..elsif..endform. (@koic)- #11213: Support redundant department disable in scope of
Lint/RedundantCopDisableDirectivecop. (@isarcasm)- #11200: Fix an incorrect autocorrect for
Layout/MultilineMethodCallBraceLayoutwhen using method chain for heredoc argument in multiline literal brace layout. (@koic)- #11190: Fix an error for
Style/IfWithSemicolonwhen using one line if/;/end without then boby. (@koic)- #11244: Fix a false negative for
Style/RedundantReturnwhen dynamic define methods. (@ydah)Changes
- #11218: Update severity of
Bundler/DuplicatedGem,Bundler/InsecureProtocolSource,Gemspec/DeprecatedAttributeAssignment,Gemspec/DuplicatedAssignment,Gemspec/RequireMFA,Gemspec/RequiredRubyVersion, andGemspec/RubyVersionGlobalsUsagecops to warning. (@koic)- #11222: Make
Style/RedundantArgumentaware ofArray#sum. (@koic)- #11070: Add ability to count method calls as one line to code length related
Metriccops. (@fatkodima)- #11226: Make
Lint/Voidaware of used lambda and proc in void context. (@koic)- #11205: Change
Lint/InterpolationCheckfromSafe: falsetoSafeAutoCorrect: false. (@r7kamura)- #11212: Make
Lint/DeprecatedConstantsaware of deprecatedStruct::GroupandStruct::Passwdclasses. (@koic)- #11236: Remove
respond_tofrom default value ofAllowedMethodsforStyle/SymbolProc. (@koic)- #11185: Make
Style/HashSyntaxaware of without parentheses call expr follows. (@koic)- #11203: Support multiple arguments on
Lint/SendWithMixinArgument. (@r7kamura)- #11229: Add
cctoAllowedNamesofMethodParameterNamecop. (@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/RedundantConstantBasecop. ([@r7kamura][])- #11205: Add
--[no-]auto-gen-enforced-styleCLI option. ([@ydah][])- #11224: Add
Style/RequireOrdercop. ([@r7kamura][])- #11219: Make
Style/SelectByRegexpaware of!~method. ([@koic][])- #11224: Add new cop
Style/ArrayIntersectwhich 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/ParenthesesAsGroupedExpressionwhen using a block argument. ([@ydah][])- #11143: Fix RedundantCopDisableDirective errors when encountering several department comments. ([
@isarcasm][])- #11230: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen 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/GuardClausewhen using heredoc as an argument of raise in branch body. ([@koic][])- #11182: Fix an incorrect autocorrect for
EnforcedShorthandSyntax: alwaysofStyle/HashSyntaxwithStyle/IfUnlessModifierwhen using Ruby 3.1. ([@koic][])- #11184: Fix an error for
Lint/ShadowingOuterLocalVariablewhen a block local variable has same name as an outeruntilscope variable. ([@koic][])- #11198: Fix an error for
Lint/EmptyConditionalBodywhen one using line if/;/end without then boby. ([@koic][])- #11196: Fix a false positive for
Style/GuardClausewhen usingraiseinthenbody ofif..elsif..endform. ([@koic][])- #11213: Support redundant department disable in scope of
Lint/RedundantCopDisableDirectivecop. ([@isarcasm][])- #11200: Fix an incorrect autocorrect for
Layout/MultilineMethodCallBraceLayoutwhen using method chain for heredoc argument in multiline literal brace layout. ([@koic][])- #11190: Fix an error for
Style/IfWithSemicolonwhen using one line if/;/end without then boby. ([@koic][])- #11244: Fix a false negative for
Style/RedundantReturnwhen dynamic define methods. ([@ydah][])Changes
- #11218: Update severity of
Bundler/DuplicatedGem,Bundler/InsecureProtocolSource,Gemspec/DeprecatedAttributeAssignment,Gemspec/DuplicatedAssignment,Gemspec/RequireMFA,Gemspec/RequiredRubyVersion, andGemspec/RubyVersionGlobalsUsagecops to warning. ([@koic][])- #11222: Make
Style/RedundantArgumentaware ofArray#sum. ([@koic][])- #11070: Add ability to count method calls as one line to code length related
Metriccops. ([@fatkodima][])- #11226: Make
Lint/Voidaware of used lambda and proc in void context. ([@koic][])- #11205: Change
Lint/InterpolationCheckfromSafe: falsetoSafeAutoCorrect: false. ([@r7kamura][])- #11212: Make
Lint/DeprecatedConstantsaware of deprecatedStruct::GroupandStruct::Passwdclasses. ([@koic][])- #11236: Remove
respond_tofrom default value ofAllowedMethodsforStyle/SymbolProc. ([@koic][])- #11185: Make
Style/HashSyntaxaware of without parentheses call expr follows. ([@koic][])- #11203: Support multiple arguments on
Lint/SendWithMixinArgument. ([@r7kamura][])- #11229: Add
cctoAllowedNamesofMethodParameterNamecop. ([@tjschuck][])- #11116: Handle ternaries in
Style/SafeNavigation. ([@fatkodima][])
Commits
9c682a5Cut 1.40e7080e8Update Changelog54bd547Optimize checking if the file is relevant for the cop7aa43c2Merge pull request #11248 from ydah/fix/typosa538c4aFix a typo for CHANGELOG entry9c27f87Merge pull request #11245 from ydah/fix/112448619545[Fix #11244] Fix a false negative forStyle/RedundantReturnwhen dynamic de...52eaa84[Fix #11239] Fix an incorrect autocorrect forStyle/GuardClausee46f92dUpdate examples and doc88f1193Update example- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)