#11219: Make Style/SelectByRegexp aware of !~ method. (@koic)
#11224: Add new cop Style/ArrayIntersect which replaces (array1 & array2).any? with array1.intersect?(array2), method Array#intersect? was added in ruby 3.1. (@KirIgor)
#11211: Add autocorrect for Lint/AssignmentInCondition. (@r7kamura)
#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 of Style/HashSyntax with Style/IfUnlessModifier when using Ruby 3.1. (@koic)
#11184: Fix an error for Lint/ShadowingOuterLocalVariable when a block local variable has same name as an outer until 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 using raise in then body of if..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, and Gemspec/RubyVersionGlobalsUsage cops to warning. (@koic)
#11222: Make Style/RedundantArgument aware of Array#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 from Safe: false to SafeAutoCorrect: false. (@r7kamura)
#11212: Make Lint/DeprecatedConstants aware of deprecated Struct::Group and Struct::Passwd classes. (@koic)
#11236: Remove respond_to from default value of AllowedMethods for Style/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 to AllowedNames of MethodParameterName cop. (@tjschuck)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu close
Closes this PR and deletes the branch
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ rubocop (~> 1.37.1 → ~> 1.40.0) · Repo · Changelog
Release Notes
1.40.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 69 commits:
Cut 1.40
Update Changelog
Optimize checking if the file is relevant for the cop
Merge pull request #11248 from ydah/fix/typos
Fix a typo for CHANGELOG entry
Merge pull request #11245 from ydah/fix/11244
[Fix #11244] Fix a false negative for `Style/RedundantReturn` when dynamic define methods
[Fix #11239] Fix an incorrect autocorrect for `Style/GuardClause`
Update examples and doc
Update example
Add new `Style/ArrayIntersect` cop
Add `Style/RequireOrder` cop
Merge pull request #11240 from fatkodima/optimize
Optimize rubocop
Use Ruby 3.2 parser for docs
[CI] Add GitHub token permissions for workflows (#10947)
[Fix #11213] Support redundant department disable linting
Remove `respond_to` from default value of `AllowedMethods` for `Style/SymbolProc`
Add ability to count method calls as one line to code length related `Metric` cops
[Fix #5251] Fix loading of configuration in multi-file edge case
[Fix #11230] Fix an incorrect autocorrect for `Lint/SafeNavigationChain`
Handle ternaries in `Style/SafeNavigation`
Add `Style/RedundantConstantBase` cop (#11179)
Merge pull request #11234 from rubocop/ci-setup
CI: Let ruby/setup-run install gems
Merge pull request #11229 from tjschuck/allow-cc-as-2-letter-method-name
Add `cc` to `AllowedNames` of `MethodParameterName` cop
Make `Lint/Void` aware of used lambda and proc
[Fix #11219] Make `Style/SelectByRegexp` aware of `!~` method
Add `--[no-]auto-gen-enforced-style` CLI option
Update severity of some `Bundler` and `RubyGems` cops to warning
Make `Style/RedundantArgument` aware of `Array#sum`
Add new `InternalAffairs/LambdaOrProc` cop
Merge pull request #11217 from rubocop/dependabot/github_actions/actions/setup-python-4
Bump actions/setup-python from 2 to 4
Added dependabot for GitHub Actions
Update lib/rubocop/cop/lint/assignment_in_condition.rb
Add autocorrect for `Lint/AssignmentInCondition`
Change `Lint/InterpolationCheck` from `Safe: false` to `SafeAutoCorrect: false`
Remove a redundant condition
Make `Lint/DeprecatedConstants` aware of `Struct::Group` and `Struct::Passwd`
[Fix #11143] RedundantCopDisableDirective ignores departments (#11210)
Merge pull request #11209 from DiegoSPB/fix-11157
[fix rubocop#11157] -- Update Registry Docs
[Doc] Update the configuration.adoc
Merge pull request #11201 from koic/fix_an_incorrect_autocorrect_for_layout_multiline_method_call_brace_layout
Merge pull request #11203 from r7kamura/feature/send-with-mixin
Support multiple arguments on `Lint/SendWithMixinArgument`
[Fix #11200] Fix an incorrect autocorrect for `Layout/MultilineMethodCallBraceLayout`
Merge pull request #11198 from koic/fix_error_for_lint_empty_conditional_body
Fix an error for `Lint/EmptyConditionalBody`
Fix a build error
[Fix #11182] Fix an incorrect autocorrect for `Style/IfUnlessModifier`
Make `Style/HashSyntax` aware of without parentheses call expr follows
[Fix #11196] Fix a false positive for `Style/GuardClause`
Merge pull request #11194 from ydah/fix/11192
[Fix #11192] Fix a false positive for `Lint/ParenthesesAsGroupedExpression` when using a block argument
Fix a typo
Fix a typo
Merge pull request #11190 from koic/fix_an_error_for_style_if_with_semicolon
Fix an error for `Style/IfWithSemicolon`
Merge pull request #11186 from koic/fix_error_for_lint_shadowing_outer_local_variable
[Doc] Update an internal API comment
[Doc] Tweak the doc for `Lint/DeprecatedConstants`
[Fix #11184] Fix an error for `Lint/ShadowingOuterLocalVariable`
Merge pull request #11181 from noelblaschke/fix/asdf-tool-versions-may-contain-multiple-runtimes
Fix pattern to match .tool-versions files that specify multiple runtimes
Fix a duplication in the changelog
Switch back the docs version
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands