Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rubocop from 1.67.0 to 1.68.0 #682

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 1, 2024

Bumps rubocop from 1.67.0 to 1.68.0.

Release notes

Sourced from rubocop's releases.

RuboCop 1.68

New features

Bug fixes

  • #13401: Fix a false negative for Style/RedundantLineContinuation when there is a line continuation at the EOF. (@​koic)
  • #13368: Fix an incorrect autocorrect for Naming/BlockForwarding with Style/ExplicitBlockArgument. (@​koic)
  • #13391: Fix deserialization of unknown encoding offenses. (@​earlopain)
  • #13348: Ensure Style/BlockDelimiters autocorrection does not move other code between the block and comment. (@​dvandersluis)
  • #13382: Fix an error during error handling for custom ruby extractors when the extractor is a class. (@​earlopain)
  • #13309: Fix a false negative for Lint/UselessAssignment cop when there is a useless assignment followed by a block. (@​pCosta99)
  • #13255: Fix false negatives for Style/MapIntoArray when using non-splatted arguments. (@​vlad-pisanov)
  • #13356: Fix a false positive for Layout/SpaceBeforeBrackets when there is a dot before []=. (@​earlopain)
  • #13365: Fix false positives for Lint/SafeNavigationConsistency when using safe navigation on the LHS with operator method on the RHS of &&. (@​koic)
  • #13390: Fix false positives for Style/GuardClause when using a local variable assigned in a conditional expression in a branch. (@​koic)
  • #13337: Fix false positives for Style/RedundantLineContinuation when required line continuations for && is used with an assignment after a line break. (@​koic)
  • #13387: Fix false positives in Style/RedundantParentheses when parentheses are used around method chain with do...end block in keyword argument. (@​koic)
  • #13341: Fix false positives for Lint/SafeNavigationChain when a safe navigation operator is used with a method call as the RHS operand of && for the same receiver. (@​koic)
  • #13324: Fix --disable-uncorrectable to not insert a comment inside a string continuation. (@​dvandersluis)
  • #13364: Fix incorrect autocorrect with Lint/UselessAssignment a multiple assignment or for contains an inner assignment. (@​dvandersluis)
  • #13353: Fix an incorrect autocorrect for Style/BlockDelimiters when EnforcedStyle: semantic is set and used with Layout/SpaceInsideBlockBraces. (@​koic)
  • #13361: Fix false positives for Style/RedundantInterpolationUnfreeze and Style/RedundantFreeze when strings contain interpolated global, instance, and class variables. (@​vlad-pisanov)
  • #13343: Prevent Layout/LineLength from breaking up a method with arguments chained onto a heredoc delimiter. (@​dvandersluis)
  • #13374: Return exit code 0 with --display-only-correctable and --display-only-safe-correctable when no offenses are displayed. (@​dvandersluis)
  • #13193: Fix false positive in Style/MultipleComparison when ComparisonsThreshold exceeds 2. (@​fatkodima,@​vlad-pisanov)
  • #13325: Fix an incorrect autocorrect for Lint/NonAtomicFileOperation when using a postfix unless for file existence checks before creating a file, in cases with Dir.mkdir. ([@​kotaro0522][])
  • #13397: Update PercentLiteralCorrector to be able to write pairs of delimiters without excessive escaping. (@​dvandersluis)
  • #13336: Update Style/SafeNavigation to not autocorrect if the RHS of an and node is an or node. (@​dvandersluis)
  • #13378: When removing parens in Style/TernaryParentheses with a send node condition, ensure its arguments are parenthesized. (@​dvandersluis)

Changes

  • #13347: When running rubocop -V, show the analysis Ruby version of the current directory. (@​earlopain)

... (truncated)

Changelog

Sourced from rubocop's changelog.

1.68.0 (2024-10-31)

New features

Bug fixes

  • #13401: Fix a false negative for Style/RedundantLineContinuation when there is a line continuation at the EOF. ([@​koic][])
  • #13368: Fix an incorrect autocorrect for Naming/BlockForwarding with Style/ExplicitBlockArgument. ([@​koic][])
  • #13391: Fix deserialization of unknown encoding offenses. ([@​earlopain][])
  • #13348: Ensure Style/BlockDelimiters autocorrection does not move other code between the block and comment. ([@​dvandersluis][])
  • #13382: Fix an error during error handling for custom ruby extractors when the extractor is a class. ([@​earlopain][])
  • #13309: Fix a false negative for Lint/UselessAssignment cop when there is a useless assignment followed by a block. ([@​pCosta99][])
  • #13255: Fix false negatives for Style/MapIntoArray when using non-splatted arguments. ([@​vlad-pisanov][])
  • #13356: Fix a false positive for Layout/SpaceBeforeBrackets when there is a dot before []=. ([@​earlopain][])
  • #13365: Fix false positives for Lint/SafeNavigationConsistency when using safe navigation on the LHS with operator method on the RHS of &&. ([@​koic][])
  • #13390: Fix false positives for Style/GuardClause when using a local variable assigned in a conditional expression in a branch. ([@​koic][])
  • #13337: Fix false positives for Style/RedundantLineContinuation when required line continuations for && is used with an assignment after a line break. ([@​koic][])
  • #13387: Fix false positives in Style/RedundantParentheses when parentheses are used around method chain with do...end block in keyword argument. ([@​koic][])
  • #13341: Fix false positives for Lint/SafeNavigationChain when a safe navigation operator is used with a method call as the RHS operand of && for the same receiver. ([@​koic][])
  • #13324: Fix --disable-uncorrectable to not insert a comment inside a string continuation. ([@​dvandersluis][])
  • #13364: Fix incorrect autocorrect with Lint/UselessAssignment a multiple assignment or for contains an inner assignment. ([@​dvandersluis][])
  • #13353: Fix an incorrect autocorrect for Style/BlockDelimiters when EnforcedStyle: semantic is set and used with Layout/SpaceInsideBlockBraces. ([@​koic][])
  • #13361: Fix false positives for Style/RedundantInterpolationUnfreeze and Style/RedundantFreeze when strings contain interpolated global, instance, and class variables. ([@​vlad-pisanov][])
  • #13343: Prevent Layout/LineLength from breaking up a method with arguments chained onto a heredoc delimiter. ([@​dvandersluis][])
  • #13374: Return exit code 0 with --display-only-correctable and --display-only-safe-correctable when no offenses are displayed. ([@​dvandersluis][])
  • #13193: Fix false positive in Style/MultipleComparison when ComparisonsThreshold exceeds 2. ([@​fatkodima][],[@​vlad-pisanov][])
  • #13325: Fix an incorrect autocorrect for Lint/NonAtomicFileOperation when using a postfix unless for file existence checks before creating a file, in cases with Dir.mkdir. ([@​kotaro0522][])
  • #13397: Update PercentLiteralCorrector to be able to write pairs of delimiters without excessive escaping. ([@​dvandersluis][])
  • #13336: Update Style/SafeNavigation to not autocorrect if the RHS of an and node is an or node. ([@​dvandersluis][])
  • #13378: When removing parens in Style/TernaryParentheses with a send node condition, ensure its arguments are parenthesized. ([@​dvandersluis][])

Changes

  • #13347: When running rubocop -V, show the analysis Ruby version of the current directory. ([@​earlopain][])
Commits
  • 7d35ef7 Cut 1.68
  • 3033deb Update Changelog
  • 37e9e5f [Fix #12140] Add new Style/CombinableDefined cop.
  • f8aa27f Fix a false negative for Style/RedundantLineContinuation
  • d033a5e Merge pull request #13400 from Earlopain/offense-cop-name-docs
  • faaa349 Fix docs for Offense.cop_name
  • 85f9405 Fix deserialization of unknown encoding offenses
  • d499d80 [Fix #13387] Fix false positives for Style/RedundantParentheses
  • 3e855b0 Merge pull request #13399 from dvandersluis/fix-and-offense-typo
  • 1f58513 Fix typos and offense instead of an offense.
  • Additional commits viewable in compare view

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

gem compare json 2.7.2 2.7.5

Compared versions: ["2.7.2", "2.7.5"]
  DIFFERENT date:
    2.7.2: 2024-04-04 00:00:00 UTC
    2.7.5: 2024-10-30 00:00:00 UTC
  DIFFERENT extensions:
    2.7.2: ["ext/json/ext/generator/extconf.rb", "ext/json/ext/parser/extconf.rb", "ext/json/extconf.rb"]
    2.7.5: ["ext/json/ext/generator/extconf.rb", "ext/json/ext/parser/extconf.rb"]
  DIFFERENT homepage:
    2.7.2: https://flori.github.io/json
    2.7.5: https://ruby.github.io/json
  DIFFERENT metadata:
    2.7.2: {"bug_tracker_uri"=>"https://github.com/flori/json/issues", "changelog_uri"=>"https://github.com/flori/json/blob/master/CHANGES.md", "documentation_uri"=>"https://flori.github.io/json/doc/index.html", "homepage_uri"=>"https://flori.github.io/json", "source_code_uri"=>"https://github.com/flori/json", "wiki_uri"=>"https://github.com/flori/json/wiki"}
    2.7.5: {"bug_tracker_uri"=>"https://github.com/ruby/json/issues", "changelog_uri"=>"https://github.com/ruby/json/blob/master/CHANGES.md", "documentation_uri"=>"https://ruby.github.io/json/doc/index.html", "homepage_uri"=>"https://ruby.github.io/json", "source_code_uri"=>"https://github.com/ruby/json", "wiki_uri"=>"https://github.com/ruby/json/wiki"}
  DIFFERENT require_paths:
    2.7.2: ["/opt/hostedtoolcache/Ruby/3.3.5/x64/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/json-2.7.2", "lib"]
    2.7.5: ["/opt/hostedtoolcache/Ruby/3.3.5/x64/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/json-2.7.5", "lib"]
  DIFFERENT rubygems_version:
    2.7.2: 3.6.0.dev
    2.7.5: 3.5.11
  DIFFERENT version:
    2.7.2: 2.7.2
    2.7.5: 2.7.5
  DIFFERENT files:
    2.7.2->2.7.5:
      * Deleted:
            LICENSE
            ext/json/ext/generator/depend
            ext/json/ext/parser/depend
            ext/json/extconf.rb
      * Added:
            BSDL +22/-0
            COPYING +56/-0
            LEGAL +60/-0
            lib/json/ext/generator/state.rb +135/-0
      * Changed:
            CHANGES.md +50/-17
            README.md +13/-165
            ext/json/ext/fbuffer/fbuffer.h +23/-64
            ext/json/ext/generator/extconf.rb +8/-2
            ext/json/ext/generator/generator.c +500/-671
            ext/json/ext/generator/generator.h +16/-75
            ext/json/ext/parser/extconf.rb +3/-1
            ext/json/ext/parser/parser.c +279/-253
            ext/json/ext/parser/parser.h +4/-40
            ext/json/ext/parser/parser.rl +209/-183
            json.gemspec +42/-49
            lib/json.rb +1/-1
            lib/json/add/bigdecimal.rb +1/-1
            lib/json/add/complex.rb +1/-1
            lib/json/add/core.rb +1/-1
            lib/json/add/date.rb +1/-1
            lib/json/add/date_time.rb +1/-1
            lib/json/add/exception.rb +1/-1
            lib/json/add/ostruct.rb +1/-1
            lib/json/add/range.rb +1/-1
            lib/json/add/rational.rb +1/-1
            lib/json/add/regexp.rb +1/-1
            lib/json/add/struct.rb +1/-1
            lib/json/add/symbol.rb +1/-2
            lib/json/add/time.rb +3/-10
            lib/json/common.rb +79/-43
            lib/json/ext.rb +15/-5
            lib/json/generic_object.rb +1/-1
            lib/json/pure.rb +1/-0
            lib/json/pure/generator.rb +96/-29
            lib/json/pure/parser.rb +27/-33
            lib/json/version.rb +3/-7
  DIFFERENT extra_rdoc_files:
    2.7.2->2.7.5:
      * Changed:
            README.md +13/-165

Copy link

github-actions bot commented Nov 1, 2024

gem compare --diff json 2.7.2 2.7.5

Diff too large (207709 chars)

Copy link

github-actions bot commented Nov 1, 2024

gem compare parser 3.3.5.0 3.3.5.1

Compared versions: ["3.3.5.0", "3.3.5.1"]
  DIFFERENT date:
    3.3.5.0: 2024-09-04 00:00:00 UTC
    3.3.5.1: 2024-10-31 00:00:00 UTC
  DIFFERENT metadata:
    3.3.5.0: {"bug_tracker_uri"=>"https://github.com/whitequark/parser/issues", "changelog_uri"=>"https://github.com/whitequark/parser/blob/v3.3.5.0/CHANGELOG.md", "documentation_uri"=>"https://www.rubydoc.info/gems/parser/3.3.5.0", "source_code_uri"=>"https://github.com/whitequark/parser/tree/v3.3.5.0"}
    3.3.5.1: {"bug_tracker_uri"=>"https://github.com/whitequark/parser/issues", "changelog_uri"=>"https://github.com/whitequark/parser/blob/v3.3.5.1/CHANGELOG.md", "documentation_uri"=>"https://www.rubydoc.info/gems/parser/3.3.5.1", "source_code_uri"=>"https://github.com/whitequark/parser/tree/v3.3.5.1"}
  DIFFERENT version:
    3.3.5.0: 3.3.5.0
    3.3.5.1: 3.3.5.1
  DIFFERENT files:
    3.3.5.0->3.3.5.1:
      * Changed:
            LICENSE.txt +2/-1
            lib/parser/current.rb +1/-1
            lib/parser/version.rb +1/-1

Copy link

github-actions bot commented Nov 1, 2024

gem compare --diff parser 3.3.5.0 3.3.5.1

Compared versions: ["3.3.5.0", "3.3.5.1"]
  DIFFERENT files:
    3.3.5.0->3.3.5.1:
      * Changed:
        LICENSE.txt
                --- /tmp/d20241101-2523-ged0qp/parser-3.3.5.0/LICENSE.txt	2024-11-01 03:11:05.438617479 +0000
                +++ /tmp/d20241101-2523-ged0qp/parser-3.3.5.1/LICENSE.txt	2024-11-01 03:11:05.594620233 +0000
                @@ -1 +1,2 @@
                -Copyright (c) 2013-2016 whitequark  <whitequark@whitequark.org>
                +Copyright (c) 2013-2024 parser project contributors
                +Copyright (c) 2013-2016 Catherine  <whitequark@whitequark.org>
        lib/parser/current.rb
                --- /tmp/d20241101-2523-ged0qp/parser-3.3.5.0/lib/parser/current.rb	2024-11-01 03:11:05.438617479 +0000
                +++ /tmp/d20241101-2523-ged0qp/parser-3.3.5.1/lib/parser/current.rb	2024-11-01 03:11:05.594620233 +0000
                @@ -105 +105 @@
                -    current_version = '3.2.5'
                +    current_version = '3.2.6'
        lib/parser/version.rb
                --- /tmp/d20241101-2523-ged0qp/parser-3.3.5.0/lib/parser/version.rb	2024-11-01 03:11:05.590620162 +0000
                +++ /tmp/d20241101-2523-ged0qp/parser-3.3.5.1/lib/parser/version.rb	2024-11-01 03:11:05.662621433 +0000
                @@ -4 +4 @@
                -  VERSION = '3.3.5.0'
                +  VERSION = '3.3.5.1'

Copy link

github-actions bot commented Nov 1, 2024

gem compare rubocop 1.67.0 1.68.0

Compared versions: ["1.67.0", "1.68.0"]
  DIFFERENT date:
    1.67.0: 2024-10-15 00:00:00 UTC
    1.68.0: 2024-10-31 00:00:00 UTC
  DIFFERENT metadata:
    1.67.0: {"homepage_uri"=>"https://rubocop.org/", "changelog_uri"=>"https://github.com/rubocop/rubocop/releases/tag/v1.67.0", "source_code_uri"=>"https://github.com/rubocop/rubocop/", "documentation_uri"=>"https://docs.rubocop.org/rubocop/1.67/", "bug_tracker_uri"=>"https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required"=>"true"}
    1.68.0: {"homepage_uri"=>"https://rubocop.org/", "changelog_uri"=>"https://github.com/rubocop/rubocop/releases/tag/v1.68.0", "source_code_uri"=>"https://github.com/rubocop/rubocop/", "documentation_uri"=>"https://docs.rubocop.org/rubocop/1.68/", "bug_tracker_uri"=>"https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required"=>"true"}
  DIFFERENT rubygems_version:
    1.67.0: 3.3.7
    1.68.0: 3.4.22
  DIFFERENT version:
    1.67.0: 1.67.0
    1.68.0: 1.68.0
  DIFFERENT files:
    1.67.0->1.68.0:
      * Added:
            lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +88/-0
            lib/rubocop/cop/mixin/endless_method_rewriter.rb +24/-0
            lib/rubocop/cop/style/ambiguous_endless_method_definition.rb +79/-0
            lib/rubocop/cop/style/bitwise_predicate.rb +100/-0
            lib/rubocop/cop/style/combinable_defined.rb +115/-0
            lib/rubocop/cop/style/keyword_arguments_merging.rb +67/-0
            lib/rubocop/cop/style/safe_navigation_chain_length.rb +52/-0
      * Changed:
            README.md +1/-1
            config/default.yml +40/-0
            lib/rubocop.rb +8/-0
            lib/rubocop/cached_data.rb +12/-4
            lib/rubocop/cli/command/execute_runner.rb +1/-1
            lib/rubocop/cli/command/version.rb +2/-2
            lib/rubocop/cop/autocorrect_logic.rb +22/-2
            lib/rubocop/cop/correctors/alignment_corrector.rb +1/-12
            lib/rubocop/cop/correctors/percent_literal_corrector.rb +10/-0
            lib/rubocop/cop/layout/leading_comment_space.rb +29/-1
            lib/rubocop/cop/layout/space_before_brackets.rb +5/-5
            lib/rubocop/cop/layout/space_inside_block_braces.rb +4/-0
            lib/rubocop/cop/lint/duplicate_branch.rb +39/-4
            lib/rubocop/cop/lint/non_atomic_file_operation.rb +7/-0
            lib/rubocop/cop/lint/safe_navigation_chain.rb +9/-0
            lib/rubocop/cop/lint/safe_navigation_consistency.rb +3/-1
            lib/rubocop/cop/metrics/cyclomatic_complexity.rb +4/-1
            lib/rubocop/cop/mixin/check_line_breakable.rb +10/-0
            lib/rubocop/cop/mixin/frozen_string_literal.rb +3/-1
            lib/rubocop/cop/naming/block_forwarding.rb +1/-1
            lib/rubocop/cop/offense.rb +2/-3
            lib/rubocop/cop/style/block_delimiters.rb +17/-2
            lib/rubocop/cop/style/endless_method.rb +1/-14
            lib/rubocop/cop/style/guard_clause.rb +14/-1
            lib/rubocop/cop/style/map_into_array.rb +6/-1
            lib/rubocop/cop/style/multiple_comparison.rb +28/-39
            lib/rubocop/cop/style/redundant_line_continuation.rb +20/-2
            lib/rubocop/cop/style/redundant_parentheses.rb +8/-10
            lib/rubocop/cop/style/safe_navigation.rb +12/-0
            lib/rubocop/cop/style/ternary_parentheses.rb +25/-4
            lib/rubocop/cop/variable_force/assignment.rb +18/-3
            lib/rubocop/cop/variable_force/branch.rb +1/-1
            lib/rubocop/cop/variable_force/variable.rb +5/-1
            lib/rubocop/cop/variable_force/variable_table.rb +2/-2
            lib/rubocop/cops_documentation_generator.rb +11/-9
            lib/rubocop/formatter/disabled_config_formatter.rb +1/-1
            lib/rubocop/runner.rb +16/-8
            lib/rubocop/target_ruby.rb +1/-1
            lib/rubocop/version.rb +27/-8
  DIFFERENT extra_rdoc_files:
    1.67.0->1.68.0:
      * Changed:
            README.md +1/-1

Copy link

github-actions bot commented Nov 1, 2024

gem compare --diff rubocop 1.67.0 1.68.0

Diff too large (76345 chars)

Copy link

github-actions bot commented Nov 1, 2024

gem compare rubocop-ast 1.32.3 1.33.0

Compared versions: ["1.32.3", "1.33.0"]
  DIFFERENT date:
    1.32.3: 2024-09-04 00:00:00 UTC
    1.33.0: 2024-10-29 00:00:00 UTC
  DIFFERENT rubygems_version:
    1.32.3: 3.6.0.dev
    1.33.0: 3.5.11
  DIFFERENT version:
    1.32.3: 1.32.3
    1.33.0: 1.33.0
  DIFFERENT files:
    1.32.3->1.33.0:
      * Added:
            lib/rubocop/ast/node/masgn_node.rb +63/-0
            lib/rubocop/ast/node/mixin/constant_node.rb +62/-0
            lib/rubocop/ast/node/mlhs_node.rb +27/-0
            lib/rubocop/ast/node/var_node.rb +15/-0
      * Changed:
            lib/rubocop/ast.rb +4/-0
            lib/rubocop/ast/builder.rb +6/-0
            lib/rubocop/ast/node.rb +1/-1
            lib/rubocop/ast/node/block_node.rb +2/-2
            lib/rubocop/ast/node/casgn_node.rb +2/-12
            lib/rubocop/ast/node/const_node.rb +1/-52
            lib/rubocop/ast/node/if_node.rb +1/-1
            lib/rubocop/ast/node/mixin/method_dispatch_node.rb +3/-3
            lib/rubocop/ast/node/str_node.rb +1/-1
            lib/rubocop/ast/node_pattern/lexer.rex.rb +1/-2
            lib/rubocop/ast/node_pattern/parser.racc.rb +42/-40
            lib/rubocop/ast/version.rb +1/-1

Copy link

github-actions bot commented Nov 1, 2024

gem compare --diff rubocop-ast 1.32.3 1.33.0

Compared versions: ["1.32.3", "1.33.0"]
  DIFFERENT files:
    1.32.3->1.33.0:
      * Added:
        lib/rubocop/ast/node/masgn_node.rb
                --- /tmp/20241101-10146-cvp8kz	2024-11-01 03:11:52.855370648 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/masgn_node.rb	2024-11-01 03:11:52.847370518 +0000
                @@ -0,0 +1,63 @@
                +# frozen_string_literal: true
                +
                +module RuboCop
                +  module AST
                +    # A node extension for `masgn` nodes.
                +    # This will be used in place of a plain node when the builder constructs
                +    # the AST, making its methods available to all assignment nodes within RuboCop.
                +    class MasgnNode < Node
                +      # @return [MlhsNode] the `mlhs` node
                +      def lhs
                +        # The first child is a `mlhs` node
                +        node_parts[0]
                +      end
                +
                +      # @return [Array<Node>] the assignment nodes of the multiple assignment
                +      def assignments
                +        lhs.assignments
                +      end
                +
                +      # @return [Array<Symbol>] names of all the variables being assigned
                +      def names
                +        assignments.map do |assignment|
                +          if assignment.send_type? || assignment.indexasgn_type?
                +            assignment.method_name
                +          else
                +            assignment.name
                +          end
                +        end
                +      end
                +
                +      # The RHS (right hand side) of the multiple assignment. This returns
                +      # the nodes as parsed: either a single node if the RHS has a single value,
                +      # or an `array` node containing multiple nodes.
                +      #
                +      # NOTE: Due to how parsing works, `expression` will return the same for
                +      # `a, b = x, y` and `a, b = [x, y]`.
                +      #
                +      # @return [Node] the right hand side of a multiple assignment.
                +      def expression
                +        node_parts[1]
                +      end
                +      alias rhs expression
                +
                +      # In contrast to `expression`, `values` always returns a Ruby array
                +      # containing all the nodes being assigned on the RHS.
                +      #
                +      # Literal arrays are considered a singular value; but unlike `expression`,
                +      # implied `array` nodes from assigning multiple values on the RHS are treated
                +      # as separate.
                +      #
                +      # @return [Array<Node>] individual values being assigned on the RHS of the multiple assignment
                +      def values
                +        multiple_rhs? ? expression.children : [expression]
                +      end
                +
                +      private
                +
                +      def multiple_rhs?
                +        expression.array_type? && !expression.bracketed?
                +      end
                +    end
                +  end
                +end
        lib/rubocop/ast/node/mixin/constant_node.rb
                --- /tmp/20241101-10146-xyff6s	2024-11-01 03:11:52.859370712 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/mixin/constant_node.rb	2024-11-01 03:11:52.847370518 +0000
                @@ -0,0 +1,62 @@
                +# frozen_string_literal: true
                +
                +module RuboCop
                +  module AST
                +    # Common functionality for nodes that deal with constants:
                +    # `const`, `casgn`.
                +    module ConstantNode
                +      # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...)
                +      def namespace
                +        children[0]
                +      end
                +
                +      # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar
                +      def short_name
                +        children[1]
                +      end
                +
                +      # @return [Boolean] if the constant is a Module / Class, according to the standard convention.
                +      #                   Note: some classes might have uppercase in which case this method
                +      #                         returns false
                +      def module_name?
                +        short_name.match?(/[[:lower:]]/)
                +      end
                +      alias class_name? module_name?
                +
                +      # @return [Boolean] if the constant starts with `::` (aka s(:cbase))
                +      def absolute?
                +        return false unless namespace
                +
                +        each_path.first.cbase_type?
                +      end
                +
                +      # @return [Boolean] if the constant does not start with `::` (aka s(:cbase))
                +      def relative?
                +        !absolute?
                +      end
                +
                +      # Yield nodes for the namespace
                +      #
                +      #   For `::Foo::Bar::BAZ` => yields:
                +      #      s(:cbase), then
                +      #      s(:const, :Foo), then
                +      #      s(:const, s(:const, :Foo), :Bar)
                +      def each_path(&block)
                +        return to_enum(__method__) unless block
                +
                +        descendants = []
                +        last = self
                +        loop do
                +          last = last.children.first
                +          break if last.nil?
                +
                +          descendants << last
                +          break unless last.const_type?
                +        end
                +        descendants.reverse_each(&block)
                +
                +        self
                +      end
                +    end
                +  end
                +end
        lib/rubocop/ast/node/mlhs_node.rb
                --- /tmp/20241101-10146-2eic21	2024-11-01 03:11:52.863370776 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/mlhs_node.rb	2024-11-01 03:11:52.851370583 +0000
                @@ -0,0 +1,27 @@
                +# frozen_string_literal: true
                +
                +module RuboCop
                +  module AST
                +    # A node extension for `mlhs` nodes.
                +    # This will be used in place of a plain node when the builder constructs
                +    # the AST, making its methods available to all assignment nodes within RuboCop.
                +    class MlhsNode < Node
                +      # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment.
                +      # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`)
                +      # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`.
                +      #
                +      # @return [Array<Node>] the assignment nodes of the multiple assignment LHS
                +      def assignments
                +        child_nodes.flat_map do |node|
                +          if node.splat_type?
                +            node.child_nodes.first
                +          elsif node.mlhs_type?
                +            node.assignments
                +          else
                +            node
                +          end
                +        end
                +      end
                +    end
                +  end
                +end
        lib/rubocop/ast/node/var_node.rb
                --- /tmp/20241101-10146-as6dch	2024-11-01 03:11:52.935371937 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/var_node.rb	2024-11-01 03:11:52.851370583 +0000
                @@ -0,0 +1,15 @@
                +# frozen_string_literal: true
                +
                +module RuboCop
                +  module AST
                +    # A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes.
                +    # This will be used in place of a plain node when the builder constructs
                +    # the AST, making its methods available to all assignment nodes within RuboCop.
                +    class VarNode < Node
                +      # @return [Symbol] The name of the variable.
                +      def name
                +        node_parts[0]
                +      end
                +    end
                +  end
                +end
      * Changed:
        lib/rubocop/ast.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast.rb	2024-11-01 03:11:52.763369164 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast.rb	2024-11-01 03:11:52.843370454 +0000
                @@ -29,0 +30 @@
                +require_relative 'ast/node/mixin/constant_node'
                @@ -63,0 +65,2 @@
                +require_relative 'ast/node/masgn_node'
                +require_relative 'ast/node/mlhs_node'
                @@ -85,0 +89 @@
                +require_relative 'ast/node/var_node'
        lib/rubocop/ast/builder.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/builder.rb	2024-11-01 03:11:52.763369164 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/builder.rb	2024-11-01 03:11:52.843370454 +0000
                @@ -67,0 +68,2 @@
                +        masgn:               MasgnNode,
                +        mlhs:                MlhsNode,
                @@ -89,0 +92,4 @@
                +        lvar:                VarNode,
                +        ivar:                VarNode,
                +        cvar:                VarNode,
                +        gvar:                VarNode,
        lib/rubocop/ast/node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node.rb	2024-11-01 03:11:52.763369164 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node.rb	2024-11-01 03:11:52.843370454 +0000
                @@ -463 +463 @@
                -        loc.respond_to?(:begin) && loc.begin && loc.begin.is?('(')
                +        loc.respond_to?(:begin) && loc.begin&.is?('(')
        lib/rubocop/ast/node/block_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/block_node.rb	2024-11-01 03:11:52.831370261 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/block_node.rb	2024-11-01 03:11:52.843370454 +0000
                @@ -93 +93 @@
                -        loc.end&.is?('}')
                +        loc.end.is?('}')
                @@ -100 +100 @@
                -        loc.end&.is?('end')
                +        loc.end.is?('end')
        lib/rubocop/ast/node/casgn_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/casgn_node.rb	2024-11-01 03:11:52.831370261 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/casgn_node.rb	2024-11-01 03:11:52.843370454 +0000
                @@ -9,6 +9 @@
                -      # The namespace of the constant being assigned.
                -      #
                -      # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...)
                -      def namespace
                -        node_parts[0]
                -      end
                +      include ConstantNode
                @@ -16,6 +11 @@
                -      # The name of the variable being assigned as a symbol.
                -      #
                -      # @return [Symbol] the name of the variable being assigned
                -      def name
                -        node_parts[1]
                -      end
                +      alias name short_name
        lib/rubocop/ast/node/const_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/const_node.rb	2024-11-01 03:11:52.831370261 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/const_node.rb	2024-11-01 03:11:52.847370518 +0000
                @@ -7,52 +7 @@
                -      # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...)
                -      def namespace
                -        children[0]
                -      end
                -
                -      # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar
                -      def short_name
                -        children[1]
                -      end
                -
                -      # @return [Boolean] if the constant is a Module / Class, according to the standard convention.
                -      #                   Note: some classes might have uppercase in which case this method
                -      #                         returns false
                -      def module_name?
                -        short_name.match?(/[[:lower:]]/)
                -      end
                -      alias class_name? module_name?
                -
                -      # @return [Boolean] if the constant starts with `::` (aka s(:cbase))
                -      def absolute?
                -        return false unless namespace
                -
                -        each_path.first.cbase_type?
                -      end
                -
                -      # @return [Boolean] if the constant does not start with `::` (aka s(:cbase))
                -      def relative?
                -        !absolute?
                -      end
                -
                -      # Yield nodes for the namespace
                -      #
                -      #   For `::Foo::Bar::BAZ` => yields:
                -      #      s(:cbase), then
                -      #      s(:const, :Foo), then
                -      #      s(:const, s(:const, :Foo), :Bar)
                -      def each_path(&block)
                -        return to_enum(__method__) unless block
                -
                -        descendants = []
                -        last = self
                -        loop do
                -          last = last.children.first
                -          break if last.nil?
                -
                -          descendants << last
                -          break unless last.const_type?
                -        end
                -        descendants.reverse_each(&block)
                -
                -        self
                -      end
                +      include ConstantNode
        lib/rubocop/ast/node/if_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/if_node.rb	2024-11-01 03:11:52.835370325 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/if_node.rb	2024-11-01 03:11:52.847370518 +0000
                @@ -105 +105 @@
                -        else_branch&.if_type? && else_branch&.elsif?
                +        else_branch&.if_type? && else_branch.elsif?
        lib/rubocop/ast/node/mixin/method_dispatch_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/mixin/method_dispatch_node.rb	2024-11-01 03:11:52.835370325 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb	2024-11-01 03:11:52.847370518 +0000
                @@ -120 +120 @@
                -        loc.respond_to?(:dot) && loc.dot && loc.dot.is?('.')
                +        loc.respond_to?(:dot) && loc.dot&.is?('.')
                @@ -128 +128 @@
                -        loc.respond_to?(:dot) && loc.dot && loc.dot.is?('::')
                +        loc.respond_to?(:dot) && loc.dot&.is?('::')
                @@ -136 +136 @@
                -        loc.respond_to?(:dot) && loc.dot && loc.dot.is?('&.')
                +        loc.respond_to?(:dot) && loc.dot&.is?('&.')
        lib/rubocop/ast/node/str_node.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node/str_node.rb	2024-11-01 03:11:52.839370390 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node/str_node.rb	2024-11-01 03:11:52.851370583 +0000
                @@ -12 +12 @@
                -        loc.respond_to?(:begin) && loc.begin && loc.begin.is?('?')
                +        loc.respond_to?(:begin) && loc.begin&.is?('?')
        lib/rubocop/ast/node_pattern/lexer.rex.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node_pattern/lexer.rex.rb	2024-11-01 03:11:52.839370390 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node_pattern/lexer.rex.rb	2024-11-01 03:11:52.855370648 +0000
                @@ -5 +5 @@
                -# Generated by: oedipus_lex version 2.6.0.
                +# Generated by: oedipus_lex version 2.6.2.
                @@ -72 +71,0 @@
                -
        lib/rubocop/ast/node_pattern/parser.racc.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/node_pattern/parser.racc.rb	2024-11-01 03:11:52.839370390 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/node_pattern/parser.racc.rb	2024-11-01 03:11:52.855370648 +0000
                @@ -4,2 +4,2 @@
                -# This file is automatically generated by Racc 1.5.0
                -# from Racc grammar file "".
                +# This file is automatically generated by Racc 1.8.1
                +# from Racc grammar file "parser.y".
                @@ -17,2 +17,2 @@
                -    60,    22,    20,     4,    40,     5,    43,     6,     7,     8,
                -    28,    23,    56,    50,    66,    61,    24,    51,    51,    40,
                +    60,    22,    20,     4,    24,     5,    40,     6,     7,     8,
                +    28,    23,    56,    50,    40,    61,    43,    66,    51,    51,
                @@ -25 +25 @@
                -    20,     4,   nil,     5,   nil,     6,     7,     8,     9,    23,
                +    20,     4,   nil,     5,   nil,     6,     7,     8,    28,    23,
                @@ -36 +36 @@
                -    20,     4,   nil,     5,   nil,     6,     7,     8,    28,    23,
                +    20,     4,   nil,     5,   nil,     6,     7,     8,     9,    23,
                @@ -50,2 +50,2 @@
                -     9,    23,    47,    48,    49,    -1,    -1,    -1,    -2,    -2,
                -    -2 ]
                +     9,    23,    -1,    -1,    -1,    -2,    -2,    -2,    47,    48,
                +    49 ]
                @@ -55,2 +55,2 @@
                -    54,    42,    42,    42,    11,    42,    24,    42,    42,    42,
                -    42,    42,    42,    30,    62,    54,     1,    63,    30,    10,
                +    54,    42,    42,    42,     1,    42,    10,    42,    42,    42,
                +    42,    42,    42,    30,    11,    54,    24,    62,    30,    63,
                @@ -59,12 +59 @@
                -    59,    59,    59,   nil,   nil,    59,     5,     5,     5,     5,
                -     5,     5,     5,     5,     5,     5,   nil,     5,     5,     5,
                -   nil,     5,   nil,     5,     5,     5,     5,     5,     6,     6,
                -     6,     6,     6,     6,     6,     6,     6,     6,   nil,     6,
                -     6,     6,   nil,     6,   nil,     6,     6,     6,     6,     6,
                -     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,
                -   nil,     7,     7,     7,   nil,     7,   nil,     7,     7,     7,
                -     7,     7,     8,     8,     8,     8,     8,     8,     8,     8,
                -     8,     8,   nil,     8,     8,     8,   nil,     8,   nil,     8,
                -     8,     8,     8,     8,     9,     9,     9,     9,     9,     9,
                -     9,     9,     9,     9,   nil,     9,     9,     9,   nil,     9,
                -   nil,     9,     9,     9,     9,     9,     0,     0,     0,     0,
                +    59,    59,    59,   nil,   nil,    59,     0,     0,     0,     0,
                @@ -74,0 +64,11 @@
                +     5,     5,     5,     5,     5,     5,     5,     5,     5,     5,
                +   nil,     5,     5,     5,   nil,     5,   nil,     5,     5,     5,
                +     5,     5,     6,     6,     6,     6,     6,     6,     6,     6,
                +     6,     6,   nil,     6,     6,     6,   nil,     6,   nil,     6,
                +     6,     6,     6,     6,     7,     7,     7,     7,     7,     7,
                +     7,     7,     7,     7,   nil,     7,     7,     7,   nil,     7,
                +   nil,     7,     7,     7,     7,     7,     8,     8,     8,     8,
                +     8,     8,     8,     8,     8,     8,   nil,     8,     8,     8,
                +   nil,     8,   nil,     8,     8,     8,     8,     8,     9,     9,
                +     9,     9,     9,     9,     9,     9,     9,     9,   nil,     9,
                +     9,     9,   nil,     9,   nil,     9,     9,     9,     9,     9,
                @@ -88,2 +88,2 @@
                -    61,    61,    29,    29,    29,    25,    25,    25,    26,    26,
                -    26 ]
                +    61,    61,    25,    25,    25,    26,    26,    26,    29,    29,
                +    29 ]
                @@ -92,3 +92,3 @@
                -   164,    26,   nil,   nil,   186,    54,    76,    98,   120,   142,
                -    17,     2,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
                -   nil,   nil,   nil,   nil,    16,   318,   321,   208,   230,   315,
                +    54,    14,   nil,   nil,    76,    98,   120,   142,   164,   186,
                +     4,    12,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
                +   nil,   nil,   nil,   nil,    26,   315,   318,   208,   230,   321,
                @@ -98 +98 @@
                -   nil,   318,    -2,    -3,   nil,   nil,   nil ]
                +   nil,   318,     1,    -1,   nil,   nil,   nil ]
                @@ -110,5 +110,5 @@
                -     1,    33,    64,    32,    25,    34,    35,    36,    37,    38,
                -    54,    26,    39,    41,    27,    42,    46,    63,    62,   nil,
                -   nil,   nil,   nil,   nil,   nil,   nil,    45,    25,    38,   nil,
                -   nil,   nil,   nil,    53,    26,   nil,   nil,   nil,   nil,   nil,
                -    55,    57,    25,   nil,   nil,   nil,    59,   nil,   nil,    26,
                +     1,    33,    27,    25,    26,    34,    35,    36,    37,    38,
                +    42,    32,    39,    41,    46,    63,    62,    64,    54,   nil,
                +   nil,   nil,   nil,   nil,   nil,   nil,    25,    26,    38,   nil,
                +   nil,   nil,   nil,    53,    45,   nil,   nil,   nil,   nil,   nil,
                +    55,    25,    26,   nil,   nil,   nil,    59,   nil,   nil,    57,
                @@ -119,5 +119,5 @@
                -     1,     5,    13,     9,     2,     1,     1,     1,     1,     1,
                -    14,     3,     6,     6,     4,     8,    10,    11,    12,   nil,
                -   nil,   nil,   nil,   nil,   nil,   nil,     9,     2,     1,   nil,
                -   nil,   nil,   nil,     1,     3,   nil,   nil,   nil,   nil,   nil,
                -     1,     9,     2,   nil,   nil,   nil,     5,   nil,   nil,     3,
                +     1,     5,     4,     2,     3,     1,     1,     1,     1,     1,
                +     8,     9,     6,     6,    10,    11,    12,    13,    14,   nil,
                +   nil,   nil,   nil,   nil,   nil,   nil,     2,     3,     1,   nil,
                +   nil,   nil,   nil,     1,     9,   nil,   nil,   nil,   nil,   nil,
                +     1,     2,     3,   nil,   nil,   nil,     5,   nil,   nil,     9,
                @@ -128,2 +128,2 @@
                -   nil,     0,     0,     7,    10,    -4,     2,   nil,    -8,    -1,
                -   -13,   -42,   -41,   -57,   -30 ]
                +   nil,     0,    -1,     0,    -2,    -4,     2,   nil,   -13,     7,
                +   -15,   -44,   -43,   -42,   -22 ]
                @@ -241,0 +242 @@
                +Ractor.make_shareable(Racc_arg) if defined?(Ractor)
                @@ -291,0 +293 @@
                +Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
        lib/rubocop/ast/version.rb
                --- /tmp/d20241101-10146-chv8s5/rubocop-ast-1.32.3/lib/rubocop/ast/version.rb	2024-11-01 03:11:52.843370454 +0000
                +++ /tmp/d20241101-10146-chv8s5/rubocop-ast-1.33.0/lib/rubocop/ast/version.rb	2024-11-01 03:11:52.855370648 +0000
                @@ -6 +6 @@
                -      STRING = '1.32.3'
                +      STRING = '1.33.0'

@dentarg dentarg enabled auto-merge (squash) November 3, 2024 19:26
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.67.0 to 1.68.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.67.0...v1.68.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/bundler/rubocop-1.68.0 branch from 33c4bb9 to f6b1f1f Compare November 3, 2024 19:26
@dentarg dentarg merged commit b7f9c04 into main Nov 3, 2024
7 checks passed
@dentarg dentarg deleted the dependabot/bundler/rubocop-1.68.0 branch November 3, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant