Exception: RubocopPlus::Commands::BadOutput

Inherits:
StandardError
  • Object
show all
Defined in:
lib/commands/rubo/errors/bad_output.rb

Overview

When the rubo command runs rubocop, it tells rubocop to output to a specific set of files. If those files aren’t created, (or don’t have the expected format), rubo will raise a BadOutput error.

Instance Method Summary collapse

Constructor Details

#initialize(msg = "") ⇒ BadOutput

Returns a new instance of BadOutput.



6
7
8
9
# File 'lib/commands/rubo/errors/bad_output.rb', line 6

def initialize(msg="")
  @details = msg
  super
end

Instance Method Details

#messageObject



11
12
13
14
15
# File 'lib/commands/rubo/errors/bad_output.rb', line 11

def message
  "Error\n\n" \
  "  The output in the rubocop folder does not look correct.  This implies rubo wasn't able to run 'rubocop'\n" \
  "  for some reason: #{@details}.\n\n".rubo_red
end