chef/chefstyle

seems to fail if there's no .rubocop.yml

lamont-granquist opened this issue · 2 comments

% chefstyle
private method `select' called for nil:NilClass
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/target_finder.rb:113:in `excluded_dirs'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/target_finder.rb:90:in `find_files'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/target_finder.rb:60:in `target_files_in_dir'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/target_finder.rb:31:in `find'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/runner.rb:48:in `find_target_files'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/runner.rb:32:in `run'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/cli.rb:72:in `execute_runner'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/lib/rubocop/cli.rb:27:in `run'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/bin/rubocop:13:in `block in <top (required)>'
/Users/lamont/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/rubocop-0.45.0/bin/rubocop:12:in `<top (required)>'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/chefstyle-0.4.0/bin/chefstyle:13:in `load'
/Users/lamont/.rvm/gems/ruby-2.3.1/gems/chefstyle-0.4.0/bin/chefstyle:13:in `<top (required)>'
/Users/lamont/.rvm/gems/ruby-2.3.1/bin/chefstyle:22:in `load'
/Users/lamont/.rvm/gems/ruby-2.3.1/bin/chefstyle:22:in `<main>'

touch .rubocop.yml will fix it.

i think this changed at some point with an engine upgrade? possibly some weird interaction with our monkeypatching?

tas50 commented

I'm not seeing this issue anymore.

yeah i was surprised that chefstyle wasn't failing on mixlib-install before it had a .rubocop.yml the other day...