Skip to content

Support Project Configuration Gems #199

@coding-red-panda

Description

@coding-red-panda

Hello,

Rubocop has the feature to use the inherit_gem directive in a configuration file.
This allows you to wrap configuration files in a gem and use these to configure rubocop.
Since we have around 187 different projects at work, we use this to streamline our Rubocop configruation.

This however is not supported it seems with the changed made in the rubocop-0-70 channel yesterday:

/usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:196:in `rescue in gem_config_path': Unable to find gem inkycop; is the gem installed? Gem::MissingSpecError (Gem::LoadError)
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:192:in `gem_config_path'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:48:in `block (2 levels) in resolve_inheritance_from_gems'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:46:in `reverse_each'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:46:in `block in resolve_inheritance_from_gems'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:39:in `each_pair'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader_resolver.rb:39:in `resolve_inheritance_from_gems'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader.rb:49:in `load_file'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_loader.rb:86:in `configuration_from_file'
	from /usr/local/bundle/gems/rubocop-0.70.0/lib/rubocop/config_store.rb:44:in `for'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:38:in `rubocop_file_to_include?'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:16:in `block in expanded_list'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `each'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `flat_map'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `expanded_list'
	from /usr/src/app/lib/cc/engine/rubocop.rb:49:in `files_to_inspect'
	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>'

This was working fine 2 days ago before the changes got merged related to the rubocop-0-70 changes.

This is currently impacting our builds for all projects.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions