From the command line when I run rubocop --format fuubar, I see the the fuubar formatter.
When I use that formatter in my guardfile:
guard :rubocop, cli: '--format fuubar' do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
I receive the following error:
No formatter for "fuubar"
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/formatter/formatter_set.rb:56:in `builtin_formatter_class'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/formatter/formatter_set.rb:34:in `add_formatter'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/file_inspector.rb:104:in `block in formatter_set'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/file_inspector.rb:103:in `each'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/file_inspector.rb:103:in `formatter_set'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/file_inspector.rb:19:in `process_files'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/lib/rubocop/cli.rb:31:in `run'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/bin/rubocop:14:in `block in <top (required)>'
/Users/jaredmoody/.rubies/ruby-2.1.1/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/Users/jaredmoody/.gem/ruby/2.1.1/gems/rubocop-0.18.1/bin/rubocop:13:in `<top (required)>'
/Users/jaredmoody/.gem/ruby/2.1.1/bin/rubocop:23:in `load'
/Users/jaredmoody/.gem/ruby/2.1.1/bin/rubocop:23:in `<main>'
16:22:20 - ERROR - The following exception occurred while running guard-rubocop: /Users/jaredmoody/.rubies/ruby-2.1.1/lib/ruby/2.1.0/json/common.rb:155:in `initialize' A JSON text must at least contain two octets! (JSON::ParserError)
From the command line when I run
rubocop --format fuubar
, I see the the fuubar formatter.When I use that formatter in my guardfile:
I receive the following error: