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

An error occurred while Layout/RescueEnsureAlignment cop was inspecting reproduction.rb:5:4 #10018

Closed
Donald47 opened this issue Aug 16, 2021 · 1 comment

Comments

@Donald47
Copy link

Rubocop errors when attempting to lint a method using a yield and rescue pattern.


Expected behavior

Rubocop parses and lints the file.

Actual behavior

$ bundle exec rubocop ./reproduction.rb --debug
For {home directory}/{project directory}: configuration from {home directory}/{project directory}/.rubocop.yml
configuration from {home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-performance-1.11.4/config/default.yml
configuration from {home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-performance-1.11.4/config/default.yml
Default configuration from {home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/config/default.yml
configuration from {home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-rails-2.11.3/config/default.yml
configuration from {home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-rails-2.11.3/config/default.yml
Use parallel by default.
Running parallel inspection
An error occurred while Layout/RescueEnsureAlignment cop was inspecting {home directory}/{project directory}/reproduction.rb:7:4.
undefined method `selector' for #<Parser::Source::Map::Keyword:0x00007fb4ba8fb350>
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:140:in `aligned_with_line_break_method?'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:121:in `alignment_node'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:58:in `check'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:37:in `on_resbody'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:100:in `public_send'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:100:in `block (2 levels) in trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:160:in `with_cop_error_handling'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:99:in `block in trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:98:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:98:in `trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:69:in `on_resbody'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `block in on_case'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `on_case'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_rescue'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:154:in `on_def'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_def'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:154:in `on_class'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_class'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:20:in `walk'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:86:in `investigate'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/team.rb:155:in `investigate_partial'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/team.rb:83:in `investigate'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:310:in `inspect_file'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:254:in `block in do_inspection_loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:288:in `block in iterate_until_no_changes'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:281:in `loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:281:in `iterate_until_no_changes'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:250:in `do_inspection_loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:130:in `block in file_offenses'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:155:in `file_offense_cache'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:129:in `file_offenses'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:67:in `block in warm_cache'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:509:in `call_with_index'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:477:in `process_incoming_jobs'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:459:in `block in worker'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:450:in `fork'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:450:in `worker'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:441:in `block in create_workers'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `each_with_index'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `create_workers'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:380:in `work_in_processes'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:283:in `map'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb:232:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:67:in `warm_cache'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:46:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command.rb:11:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/environment.rb:18:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:71:in `run_command'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:78:in `execute_runners'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:47:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/exe/rubocop:12:in `block in <top (required)>'
{home directory}/.rubies/ruby-2.7.2/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/exe/rubocop:12:in `<top (required)>'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/bin/rubocop:23:in `load'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/bin/rubocop:23:in `<top (required)>'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:63:in `load'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:63:in `kernel_load'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:28:in `run'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:474:in `exec'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:30:in `dispatch'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:24:in `start'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/exe/bundle:49:in `block in <top (required)>'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/exe/bundle:37:in `<top (required)>'
{home directory}/.gem/ruby/2.7.2/bin/bundle:23:in `load'
{home directory}/.gem/ruby/2.7.2/bin/bundle:23:in `<main>'
Inspecting 1 file
Scanning {home directory}/{project directory}/reproduction.rb
An error occurred while Layout/RescueEnsureAlignment cop was inspecting {home directory}/{project directory}/reproduction.rb:7:4.
undefined method `selector' for #<Parser::Source::Map::Keyword:0x00007fb4ba8f8a38>
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:140:in `aligned_with_line_break_method?'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:121:in `alignment_node'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:58:in `check'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb:37:in `on_resbody'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:100:in `public_send'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:100:in `block (2 levels) in trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:160:in `with_cop_error_handling'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:99:in `block in trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:98:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:98:in `trigger_responding_cops'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:69:in `on_resbody'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `block in on_case'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:140:in `on_case'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_rescue'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:154:in `on_def'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_def'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:154:in `on_class'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:71:in `on_class'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-ast-1.10.0/lib/rubocop/ast/traversal.rb:20:in `walk'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/commissioner.rb:86:in `investigate'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/team.rb:155:in `investigate_partial'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cop/team.rb:83:in `investigate'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:310:in `inspect_file'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:254:in `block in do_inspection_loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:288:in `block in iterate_until_no_changes'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:281:in `loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:281:in `iterate_until_no_changes'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:250:in `do_inspection_loop'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:130:in `block in file_offenses'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:155:in `file_offense_cache'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:129:in `file_offenses'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:120:in `process_file'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:101:in `block in each_inspected_file'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:100:in `each'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:100:in `reduce'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:100:in `each_inspected_file'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:86:in `inspect_files'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/runner.rb:47:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/command.rb:11:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli/environment.rb:18:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:71:in `run_command'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:78:in `execute_runners'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/lib/rubocop/cli.rb:47:in `run'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/exe/rubocop:12:in `block in <top (required)>'
{home directory}/.rubies/ruby-2.7.2/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/gems/rubocop-1.19.0/exe/rubocop:12:in `<top (required)>'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/bin/rubocop:23:in `load'
{home directory}/{project directory}/vendor/bundle/ruby/2.7.0/bin/rubocop:23:in `<top (required)>'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:63:in `load'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:63:in `kernel_load'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli/exec.rb:28:in `run'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:474:in `exec'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:30:in `dispatch'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/cli.rb:24:in `start'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/exe/bundle:49:in `block in <top (required)>'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
{home directory}/.gem/ruby/2.7.2/gems/bundler-2.2.23/exe/bundle:37:in `<top (required)>'
{home directory}/.gem/ruby/2.7.2/bin/bundle:23:in `load'
{home directory}/.gem/ruby/2.7.2/bin/bundle:23:in `<main>'
.

1 file inspected, no offenses detected

1 error occurred:
An error occurred while Layout/RescueEnsureAlignment cop was inspecting {home directory}/{project directory}/reproduction.rb:7:4.

Steps to reproduce the problem

Attempt to lint

# frozen_string_literal: true

class ReproductionClass
  def method
    super do
      true
    rescue StandardError
      true
    end
  end
end

RuboCop version

$ [bundle exec] rubocop -V
1.19.0 (using Parser 3.0.2.0, rubocop-ast 1.10.0, running on ruby 2.7.2 x86_64-darwin20)
  - rubocop-performance 1.11.4
  - rubocop-rails 2.11.3
@koic
Copy link
Member

koic commented Aug 16, 2021

This issue is a dup with #9974 (comment) and solved by #10017. Thank you.

@koic koic closed this as completed Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants