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

RemoteConfig failing if remote config file inherit from other config file #4266

Closed
matrixik opened this issue Apr 12, 2017 · 0 comments
Closed
Labels

Comments

@matrixik
Copy link

Expected behavior

Two ideas (I have no preference):

  1. Discard inheritance lines from remote configuration files
  2. Try to load inherited file from same URL address
    So if file http://example.com/.rubocop.yml have inherit_from: .hound.yml try to load it from http://example.com/.hound.yml

Actual behavior

Started RuboCop with rubocop -d

For /home/zybortd: configuration from /home/zybortd/.rubocop.yml
Inheriting configuration from /home/zybortd/.rubocop-local.yml
configuration from /home/zybortd/.rubocop-https---raw-githubusercontent-com-crowbar-crowbar-master--hound-suse-yml
Default configuration from /home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/config/default.yml
Inheriting configuration from /home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/config/enabled.yml
Inheriting configuration from /home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/config/disabled.yml
configuration from /home/zybortd/.rubocop-https---raw-githubusercontent-com-crowbar-crowbar-master--hound-ruby-yml
Inheriting No such file or directory @ rb_sysopen - /home/zybortd/.hound.suse.yml
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:174:in `read'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:174:in `load_yaml_configuration'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:34:in `load_file'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:97:in `block in base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `map'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader_resolver.rb:21:in `resolve_inheritance'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:43:in `load_file'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:97:in `block in base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `map'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader_resolver.rb:21:in `resolve_inheritance'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:43:in `load_file'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:97:in `block in base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `map'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:85:in `base_configs'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader_resolver.rb:21:in `resolve_inheritance'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:43:in `load_file'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_loader.rb:113:in `configuration_from_file'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/config_store.rb:44:in `for'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/cli.rb:93:in `apply_default_formatter'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/lib/rubocop/cli.rb:25:in `run'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/bin/rubocop:13:in `block in <top (required)>'
/home/zybortd/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/home/zybortd/.rvm/gems/ruby-2.3.3/gems/rubocop-0.48.1/bin/rubocop:12:in `<top (required)>'
/usr/local/bin/rubocop:22:in `load'
/usr/local/bin/rubocop:22:in `<main>'
/home/zybortd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
/home/zybortd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'
Finished in 0.7120127960224636 seconds

Steps to reproduce the problem

In ~/.rubocop.yml

inherit_from:
  - ~/.rubocop-local.yml

In ~/ .rubocop-local.yml

inherit_from:                                                                                    
  - https://raw.githubusercontent.com/crowbar/crowbar/master/.hound.suse.yml 
  - https://raw.githubusercontent.com/crowbar/crowbar/master/.hound.ruby.yml 

RuboCop version

$ rubocop -V
0.48.1 (using Parser 2.4.0.0, running on ruby 2.3.3 x86_64-linux)
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