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

Possible conflict with rubocop-rspec? #1

Closed
andyw8 opened this issue Mar 14, 2017 · 3 comments
Closed

Possible conflict with rubocop-rspec? #1

andyw8 opened this issue Mar 14, 2017 · 3 comments
Labels

Comments

@andyw8
Copy link
Contributor

andyw8 commented Mar 14, 2017

% 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
@michaelherold
Copy link
Owner

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?

@andyw8
Copy link
Contributor Author

andyw8 commented Mar 14, 2017

@michaelherold it does work, yes. It's listed in the engine's Gemfile: https://github.com/codeclimate/codeclimate-rubocop/blob/master/Gemfile.lock#L46

@michaelherold
Copy link
Owner

Neat. Thanks for pointing that out. I'll add it to this engine as well.

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

No branches or pull requests

2 participants