Possible conflict with rubocop-rspec?
andyw8 opened this issue · comments
% codeclimate analyze -e haml_lint --dev
Starting analysis
Running haml_lint: Done!
error: (CC::Analyzer::Engine::EngineFailure) engine haml_lint:stable failed with status 1 and stderr
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- rubocop-rspec (LoadError)
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader_resolver.rb:15:in `block in resolve_requires'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader_resolver.rb:11:in `each'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader_resolver.rb:11:in `resolve_requires'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:37:in `load_file'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
from /usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter/rubocop.rb:42:in `lint_file'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter/rubocop.rb:32:in `block in find_lints'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter/rubocop.rb:81:in `with_ruby_from_stdin'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter/rubocop.rb:31:in `find_lints'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter/rubocop.rb:15:in `visit_root'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/haml_visitor.rb:40:in `safe_send'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/haml_visitor.rb:19:in `visit'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/linter.rb:28:in `run'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:84:in `block in collect_lints'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:83:in `map'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:83:in `collect_lints'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:119:in `process_file'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:108:in `block in process_files'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:107:in `each'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:107:in `process_files'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:132:in `report'
from /usr/local/bundle/gems/haml_lint-0.23.1/lib/haml_lint/runner.rb:23:in `run'
from /usr/src/app/lib/cc/engine/source_file.rb:64:in `process'
from /usr/src/app/lib/cc/engine/haml_lint.rb:54:in `block in run'
from /usr/src/app/lib/cc/engine/haml_lint.rb:48:in `run'
from /usr/src/app/bin/codeclimate-haml_lint:10:in `<main>'
My .rubocop.yml
has this on the first line:
require: rubocop-rspec
Hmm, this is a feature of Rubocop that is new to me. I had no idea you could require arbitrary libraries inside of .rubocop.yml
.
Does the Rubocop CodeClimate engine work with this .rubocop.yml
file?
@michaelherold it does work, yes. It's listed in the engine's Gemfile: https://github.com/codeclimate/codeclimate-rubocop/blob/master/Gemfile.lock#L46
Neat. Thanks for pointing that out. I'll add it to this engine as well.