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

An empty section in configuration raise a non explicit error #1782

Closed
bankair opened this issue Apr 11, 2015 · 2 comments
Closed

An empty section in configuration raise a non explicit error #1782

bankair opened this issue Apr 11, 2015 · 2 comments

Comments

@bankair
Copy link
Contributor

bankair commented Apr 11, 2015

$ cat .rubocop.yml
AllCops:
  RunRailsCops: true

Rails/HasAndBelongsToMany:
$ touch foobar.rb
$ rubocop foobar.rb
Inspecting 1 file


0 files inspected, no offenses detected
undefined method `each_key' for nil:NilClass
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config.rb:177:in `block in validate_parameter_names'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config.rb:176:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config.rb:176:in `validate_parameter_names'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config.rb:111:in `validate'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config.rb:80:in `warn_unless_valid'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config_loader.rb:41:in `load_file'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config_loader.rb:85:in `configuration_from_file'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/config_store.rb:40:in `for'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:127:in `inspect_file'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:100:in `block in do_inspection_loop'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:94:in `loop'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:94:in `do_inspection_loop'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:72:in `process_file'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:53:in `block in inspect_files'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:51:in `each'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:51:in `inspect_files'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/runner.rb:30:in `run'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/lib/rubocop/cli.rb:24:in `run'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/bin/rubocop:13:in `block in <top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/usr/local/var/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rubocop-0.30.0/bin/rubocop:12:in `<top (required)>'
/usr/local/var/rbenv/versions/2.0.0-p353/bin/rubocop:23:in `load'
/usr/local/var/rbenv/versions/2.0.0-p353/bin/rubocop:23:in `<main>'
$

I'll propose a PR

@jonas054
Copy link
Collaborator

👍 Good.

@bankair
Copy link
Contributor Author

bankair commented Apr 14, 2015

closed by PR #1784

@bankair bankair closed this as completed Apr 14, 2015
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

2 participants