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

VariableForce cop failing with errors after updating to 0.85.1 and renerating todo with --auto-gen-config #8130

Closed
jethroo opened this issue Jun 10, 2020 · 1 comment

Comments

@jethroo
Copy link
Contributor

jethroo commented Jun 10, 2020

I just tried to update rubocop in our project from rubocop (0.82.0) to 0.85.1.

Running rubocop yielded new offenses (but ran fine without errors) which I wanted to add to the rubocop todo via bundle exec rubocop --auto-gen-config.

While generating the .rubocop_todo.yml I ran into a lots of An error occurred while VariableForce cop was inspecting... errors.

Here is the debug for one file inspected in debug mode:

1 file inspected, 12 offenses detected

1 error occurred:
An error occurred while VariableForce cop was inspecting /Users/carstenwirth/Workspace/<path_to_file>
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop-hq/rubocop/issues

Mention the following information in the issue report:
0.85.1 (using Parser 2.7.1.3, rubocop-ast 0.0.3, running on ruby 2.6.6 x86_64-darwin19)
Finished in 0.22288399992976338 seconds
Scanning /Users/carstenwirth/Workspace/<path_to_file>
An error occurred while VariableForce cop was inspecting /Users/carstenwirth/Workspace/<path_to_file>.
uninitialized constant DidYouMean::SpellChecker
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/name_similarity.rb:18:in `find_similar_names'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/name_similarity.rb:9:in `find_similar_name'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:97:in `similar_name_message'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:77:in `message_specification'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:68:in `message_for_useless_assignment'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:52:in `block in check_for_unused_assignments'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:49:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:49:in `check_for_unused_assignments'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:42:in `block in after_leaving_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:41:in `each_value'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/lint/useless_assignment.rb:41:in `after_leaving_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/force.rb:33:in `block in run_hook'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/force.rb:30:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/force.rb:30:in `run_hook'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:394:in `block (2 levels) in <class:VariableForce>'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force/variable_table.rb:17:in `invoke_hook'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force/variable_table.rb:36:in `pop_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:96:in `inspect_variables_in_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:292:in `process_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:86:in `process_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:103:in `block in process_children'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:187:in `block in each_child_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:184:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:184:in `each_child_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:100:in `process_children'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:87:in `process_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:103:in `block in process_children'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:187:in `block in each_child_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:184:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-ast-0.0.3/lib/rubocop/ast/node.rb:184:in `each_child_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:100:in `process_children'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:95:in `inspect_variables_in_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:292:in `process_scope'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:86:in `process_node'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/variable_force.rb:80:in `investigate'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:87:in `block (2 levels) in invoke_custom_processing'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:115:in `with_cop_error_handling'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:86:in `block in invoke_custom_processing'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:83:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:83:in `invoke_custom_processing'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/commissioner.rb:42:in `investigate'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/team.rb:149:in `investigate'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/team.rb:137:in `offenses'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cop/team.rb:75:in `inspect_file'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:299:in `inspect_file'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:247:in `block in do_inspection_loop'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:279:in `block in iterate_until_no_changes'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:272:in `loop'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:272:in `iterate_until_no_changes'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:243:in `do_inspection_loop'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:122:in `block in file_offenses'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:146:in `file_offense_cache'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:120:in `file_offenses'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:111:in `process_file'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:90:in `block in each_inspected_file'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:89:in `each'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:89:in `reduce'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:89:in `each_inspected_file'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:78:in `inspect_files'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:39:in `run'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli/command.rb:10:in `run'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli/environment.rb:17:in `run'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli.rb:65:in `run_command'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli.rb:72:in `execute_runners'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/lib/rubocop/cli.rb:41:in `run'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/exe/rubocop:13:in `block in <top (required)>'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/Users/carstenwirth/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-0.85.1/exe/rubocop:12:in `<top (required)>'
/Users/carstenwirth/.rbenv/versions/2.6.6/bin/rubocop:23:in `load'
/Users/carstenwirth/.rbenv/versions/2.6.6/bin/rubocop:23:in `<main>'

Expected behavior

bundle exec rubocop --auto-gen-config should run without errors

Actual behavior

bundle exec rubocop ran fine after update with the old .rubocop_todo.yml. but

But bundle exec rubocop --auto-gen-config and followup bundle exec rubocop are raising
An error occurred while VariableForce cop was inspecting... errors.

Steps to reproduce the problem

see above

RuboCop version

$ [bundle exec] rubocop -V
0.85.1 (using Parser 2.7.1.3, rubocop-ast 0.0.3, running on ruby 2.6.6 x86_64-darwin19)
@jethroo
Copy link
Contributor Author

jethroo commented Jun 10, 2020

sorry, dublicate of #7979

@jethroo jethroo closed this as completed Jun 10, 2020
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

1 participant