Class: Querly::CLI::Formatter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/querly/cli/formatter.rb

Direct Known Subclasses

JSON, Text

Instance Method Summary collapse

Instance Method Details

#config_error(path, error) ⇒ Object

Called when failed to load config Exit(status == 0) after the call



13
# File 'lib/querly/cli/formatter.rb', line 13

def config_error(path, error); end

#config_load(config) ⇒ Object

Called when config is successfully loaded



9
# File 'lib/querly/cli/formatter.rb', line 9

def config_load(config); end

#fatal_error(error) ⇒ Object

Called on other error Abort(status != 0) after the call



27
28
29
30
# File 'lib/querly/cli/formatter.rb', line 27

def fatal_error(error)
  STDERR.puts Rainbow("Fatal error: #{error}").red
  STDERR.puts error.backtrace.inspect
end

#finishObject

Called on exit/abort



33
# File 'lib/querly/cli/formatter.rb', line 33

def finish; end

#issue_found(script, rule, pair) ⇒ Object

Called when issue is found



23
# File 'lib/querly/cli/formatter.rb', line 23

def issue_found(script, rule, pair); end

#script_error(path, error) ⇒ Object

Called when failed to load script Continue after the call



20
# File 'lib/querly/cli/formatter.rb', line 20

def script_error(path, error); end

#script_load(script) ⇒ Object

Called when script is successfully loaded



16
# File 'lib/querly/cli/formatter.rb', line 16

def script_load(script); end

#startObject

Called when analyzer started



6
# File 'lib/querly/cli/formatter.rb', line 6

def start; end