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

undefined method `on_numblock' for RuboCop::Cop::Commissioner #224

Closed
stefanahman opened this issue Feb 19, 2020 · 7 comments
Closed

undefined method `on_numblock' for RuboCop::Cop::Commissioner #224

stefanahman opened this issue Feb 19, 2020 · 7 comments
Assignees

Comments

@stefanahman
Copy link

# .codeclimate.yml
version: "2"
checks:
  file-lines:
    enabled: false
  method-lines:
    enabled: false
plugins:
  brakeman:
    enabled: true
  bundler-audit:
    enabled: true
  duplication:
    enabled: true
    config:
      languages:
      - ruby:
      - javascript:
    exclude_patterns:
    - test/
  rubocop:
    enabled: true
    channel: rubocop-0-79
exclude_patterns:
- config/
- db/
- vendor/

Error on CodeClimate:

image

/usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:114:in `block in on_send': undefined method `on_numblock' for #<RuboCop::Cop::Commissioner:0x00005595af1db600> (NoMethodError)
Did you mean?  on_block
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `each'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `each_with_index'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `on_send'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:114:in `block in on_send'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `each'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `each_with_index'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:111:in `on_send'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `block in on_begin'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `each'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `on_begin'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:107:in `on_def'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `block in on_begin'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `each'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:57:in `on_begin'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:99:in `on_class'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/ast/traversal.rb:14:in `walk'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/team.rb:124:in `investigate'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/team.rb:112:in `offenses'
	from /usr/local/bundle/gems/rubocop-0.79.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
	from /usr/src/app/lib/cc/engine/source_file.rb:14:in `inspect'
	from /usr/src/app/lib/cc/engine/rubocop.rb:35:in `block (2 levels) in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:29:in `each'
	from /usr/src/app/lib/cc/engine/rubocop.rb:29:in `block in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:28:in `chdir'
	from /usr/src/app/lib/cc/engine/rubocop.rb:28:in `run'
	from /usr/src/app/bin/codeclimate-rubocop:17:in `<main>'
@koic
Copy link

koic commented Feb 19, 2020

This error has been resolved in RuboCop 0.80.
rubocop/rubocop#7647

This issue will be resolved the 0.80 channel is activated in Code Climate.
#223

@efueger
Copy link
Member

efueger commented Feb 19, 2020

Hi @stefanahman and @koic ,

Thanks for the notification! Putting this into our review queue.

Emily, Code Climate Support

@stefanahman
Copy link
Author

@efueger how's that queue going?

@davehenton
Copy link

Hi @stefanahman. Can you update to the new Rubocop 0.80 channel, and let me know if that resolves the undefined method on_numblock'` error you're seeing?

@stefanahman
Copy link
Author

Hi @stefanahman. Can you update to the new Rubocop 0.80 channel, and let me know if that resolves the undefined method on_numblock'` error you're seeing?

I think it resolves the error mentioned above, but it's still unfortunately unusable because of #226. When are you patching to 0.80.1?

Regards

@taichi-ishitani
Copy link

Hi @stefanahman ,
I temporary disable Style/HashTransformValues cop to prevent #226 .
I use 0.80.0 but I see no errors.

@taichi-ishitani
Copy link

Hi @stefanahman ,
You can remove the workaround for #226 because #227 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants