rubocop / guard-rubocop

Guard plugin for RuboCop
MIT License
262 stars 55 forks source link

cli option doesn't accept space #23

Closed dmarcoux closed 8 years ago

dmarcoux commented 8 years ago

Hello,

When having a guard with the cli option, it doesn't take spaces into account. Here's an example of what I expected:

guard :rubocop, cli: ['-f html', '-o ./tmp/rubocop_guard.html'] do
  watch(/.+\.rb$/)
end

The output from Guard with the configuration from above:

No formatter for " html"

Then, what I had to do to make it work (removed the space between each option (-f, -o) and their values:

guard :rubocop, cli: ['-fhtml', '-o./tmp/rubocop_guard.html'] do
  watch(/.+\.rb$/)
end

Would it be possible to have the expected behavior instead of the current one?

Thank you very much for your work on Guard-Rubocop, it is great. Have a good day

yujinakayama commented 8 years ago

You should write as:

cli: ['-f', 'html', '-o', './tmp/rubocop_guard.html']

or:

cli: '-f html -o ./tmp/rubocop_guard.html'