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

Extra rubocop offenses when running rubocop on ruby/spec #2539

Open
eregon opened this issue Mar 2, 2024 · 6 comments
Open

Extra rubocop offenses when running rubocop on ruby/spec #2539

eregon opened this issue Mar 2, 2024 · 6 comments
Labels
enhancement New feature or request rubocop Errors that affect Rubocop use of Prism

Comments

@eregon
Copy link
Member

eregon commented Mar 2, 2024

From rubocop/rubocop#12724 (comment)
I noticed there are 3 more offenses when running with ParserEngine: parser_prism:

core/objectspace/define_finalizer_spec.rb:166:1: W: Lint/ImplicitStringConcatenation: Combine  and  into a single string literal, rather than using implicit string concatenation.
    RUBY

language/fixtures/bytes_magic_comment.rb:2:26: F: Lint/Syntax: invalid multibyte character 0xA0
(Using Ruby 3.3 parser; configure using TargetRubyVersion parameter, under AllCops)
$magic_comment_result = '你好'.bytes.inspect
                         ^^
language/fixtures/bytes_magic_comment.rb:2:27: F: Lint/Syntax: invalid multibyte character 0xBD
(Using Ruby 3.3 parser; configure using TargetRubyVersion parameter, under AllCops)
$magic_comment_result = '你好'.bytes.inspect
                           ^^

I guess there are due to some differences between parser gem and Prism::Translation::Parser.

@kddnewton kddnewton added bug Something isn't working rubocop Errors that affect Rubocop use of Prism labels Mar 4, 2024
@kddnewton kddnewton added this to the RuboCop unblocked milestone Mar 4, 2024
@kddnewton
Copy link
Collaborator

Something very odd is happening with Parser::Source::Buffer. We're passing in a big5-encoded string, and it looks like it's transcoding it to utf-8. So then when it hits the multi-byte characters in the source, it has reencoded them as utf-8 which is invalid in big5. I think we need to tell it to please stop doing that.

@CKolkey
Copy link

CKolkey commented Mar 6, 2024

I'm not sure if this is the right place to be tracking these, so apologies if that's the case, but I also found that the following cops were being triggered incorrectly when using implicit keyword values:

# Lint/UnusedMethodArgument

def foo(bar)
  Baz.new(bar:)
end
# Lint/UnusedBlockArgument

[1, 2, 3].each do |n|
  Foo.new(n:)
end

That said, it found these (incorrect) issues very quickly, so, nice work :D

@kddnewton
Copy link
Collaborator

Thanks @CKolkey I've opened #2563 to fix this. If you find more, feel free to open new tickets.

@andyw8
Copy link
Contributor

andyw8 commented Apr 12, 2024

Here's a minimal example that results in a false positive for Layout/ExtraSpacing due to the emoji:

# 👎
<<-RUBY.squish
  a
  b
RUBY

@kddnewton
Copy link
Collaborator

Just as a note, the multibyte stuff in this issue has been fixed, but the implicit string concat thing hasn't.

@D-system
Copy link

I have got a similar issue with Japanese/Asian characters and a very specific file layout.
Using Rubocop 1.66.1 (using Prism 1.0.0, rubocop-ast 1.32.3, running on ruby 3.3.5) [arm64-darwin23]

File:

class FooController
  def create
    flash[:alert] = "更新に失敗しました。"
    Notifier.new.notify(msg: "問診でエラーが起こりました。")
  end

  def questionnaire_reply(new = false)
    {
      emojis: [
      ],
      text: "
問診の#{new ? '回答' : '更新'}ありがとうございました$
      "
    }
  end
end

Note:

  • create
    • The method must exists (even it error out on the next method)
    • The 2 lines inside must exists with Japanese characters
    • Any (further) change of the texts remove the Layout/SpaceInsideParens error
  • In questionnaire_reply
    • the emojis must exists
    • the text must be multi line
    • the ternary must exists
    • the ternary must have Japanese characters

The debug output:

For /Users/thomas/projects/ec: configuration from /Users/thomas/projects/ec/.rubocop.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rails-2.26.1/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rails-2.26.1/config/default.yml
Default configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rspec-3.0.5/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rspec-3.0.5/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-capybara-2.21.0/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-capybara-2.21.0/lib/../config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-factory_bot-2.26.1/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-factory_bot-2.26.1/lib/../config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rspec_rails-2.30.0/config/default.yml
configuration from /Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-rspec_rails-2.30.0/lib/../config/default.yml
Use parallel by default.
Skipping parallel inspection: only a single file needs inspection
Inspecting 1 file
Scanning /Users/thomas/projects/ec/app/controllers/foo_controller.rb
An error occurred while Layout/SpaceInsideParens cop was inspecting /Users/thomas/projects/ec/app/controllers/foo_controller.rb.
Parser::Source::Range: end_pos must not be less than begin_pos
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/parser-3.3.5.0/lib/parser/source/range.rb:39:in `initialize'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/mixin/range_help.rb:37:in `new'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/mixin/range_help.rb:37:in `range_between'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_parens.rb:108:in `block in correct_extraneous_space'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_parens.rb:100:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_parens.rb:100:in `each_cons'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_parens.rb:100:in `correct_extraneous_space'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_parens.rb:75:in `on_new_investigation'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:160:in `block (2 levels) in invoke'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:160:in `block in invoke'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:160:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:160:in `invoke'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:84:in `investigate'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/team.rb:168:in `investigate_partial'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/team.rb:102:in `investigate'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:349:in `block in inspect_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `flat_map'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `inspect_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:291:in `block in do_inspection_loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:325:in `block in iterate_until_no_changes'
<internal:kernel>:187:in `loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:318:in `iterate_until_no_changes'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:287:in `do_inspection_loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:168:in `block in file_offenses'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:193:in `file_offense_cache'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:167:in `file_offenses'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:158:in `process_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:139:in `block in each_inspected_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `reduce'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `each_inspected_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:124:in `inspect_files'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:77:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command.rb:11:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/environment.rb:18:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:122:in `run_command'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:129:in `execute_runners'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:51:in `block in run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:81:in `profile_if_needed'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:43:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/exe/rubocop:19:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/rubocop:25:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/rubocop:25:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:58:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:23:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:455:in `exec'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:35:in `dispatch'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:29:in `start'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/exe/bundle:28:in `block in <top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/exe/bundle:20:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/bundle:25:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/bundle:25:in `<main>'
An error occurred while Layout/SpaceInsideArrayLiteralBrackets cop was inspecting /Users/thomas/projects/ec/app/controllers/foo_controller.rb:9:14.
undefined method `line' for nil
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:138:in `line_and_column_for'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:127:in `end_has_own_line?'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:88:in `on_array'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:107:in `public_send'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:105:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:69:in `on_array'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `block in on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:71:in `on_pair'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `block in on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:71:in `on_hash'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:154:in `on_def'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:71:in `on_def'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `block in on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:137:in `on_dstr'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:71:in `on_begin'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:154:in `on_class'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:71:in `on_class'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.32.3/lib/rubocop/ast/traversal.rb:20:in `walk'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/commissioner.rb:87:in `investigate'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/team.rb:168:in `investigate_partial'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cop/team.rb:102:in `investigate'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:349:in `block in inspect_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `flat_map'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:348:in `inspect_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:291:in `block in do_inspection_loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:325:in `block in iterate_until_no_changes'
<internal:kernel>:187:in `loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:318:in `iterate_until_no_changes'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:287:in `do_inspection_loop'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:168:in `block in file_offenses'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:193:in `file_offense_cache'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:167:in `file_offenses'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:158:in `process_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:139:in `block in each_inspected_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `each'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `reduce'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:138:in `each_inspected_file'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:124:in `inspect_files'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/runner.rb:77:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/command.rb:11:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli/environment.rb:18:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:122:in `run_command'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:129:in `execute_runners'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:51:in `block in run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:81:in `profile_if_needed'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/lib/rubocop/cli.rb:43:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/rubocop-1.66.1/exe/rubocop:19:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/rubocop:25:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/rubocop:25:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:58:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli/exec.rb:23:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:455:in `exec'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:35:in `dispatch'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/cli.rb:29:in `start'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/exe/bundle:28:in `block in <top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.10/exe/bundle:20:in `<top (required)>'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/bundle:25:in `load'
/Users/thomas/.local/share/mise/installs/ruby/3.3.5/bin/bundle:25:in `<main>'
.

1 file inspected, no offenses detected

2 errors occurred:
An error occurred while Layout/SpaceInsideParens cop was inspecting /Users/thomas/projects/ec/app/controllers/foo_controller.rb.
An error occurred while Layout/SpaceInsideArrayLiteralBrackets cop was inspecting /Users/thomas/projects/ec/app/controllers/foo_controller.rb:9:14.
configuration from /Users/thomas/projects/ec/.rubocop.yml
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues

Mention the following information in the issue report:
1.66.1 (using Prism 1.0.0, rubocop-ast 1.32.3, running on ruby 3.3.5) [arm64-darwin23]
Finished in 0.4852740000933409 seconds

@kddnewton kddnewton added enhancement New feature or request and removed bug Something isn't working labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rubocop Errors that affect Rubocop use of Prism
Projects
None yet
Development

No branches or pull requests

5 participants