Class: Querly::CLI::Formatter::Base
- Inherits:
-
Object
- Object
- Querly::CLI::Formatter::Base
- Includes:
- Querly::Concerns::BacktraceFormatter
- Defined in:
- lib/querly/cli/formatter.rb
Instance Method Summary collapse
-
#config_error(path, error) ⇒ Object
Called when failed to load config Exit(status == 0) after the call.
-
#config_load(config) ⇒ Object
Called when config is successfully loaded.
-
#fatal_error(error) ⇒ Object
Called on other error Abort(status != 0) after the call.
-
#finish ⇒ Object
Called on exit/abort.
-
#issue_found(script, rule, pair) ⇒ Object
Called when issue is found.
-
#script_error(path, error) ⇒ Object
Called when failed to load script Continue after the call.
-
#script_load(script) ⇒ Object
Called when script is successfully loaded.
-
#start ⇒ Object
Called when analyzer started.
Methods included from Querly::Concerns::BacktraceFormatter
Instance Method Details
#config_error(path, error) ⇒ Object
Called when failed to load config Exit(status == 0) after the call
15 |
# File 'lib/querly/cli/formatter.rb', line 15 def config_error(path, error); end |
#config_load(config) ⇒ Object
Called when config is successfully loaded
11 |
# File 'lib/querly/cli/formatter.rb', line 11 def config_load(config); end |
#fatal_error(error) ⇒ Object
Called on other error Abort(status != 0) after the call
29 30 31 32 33 |
# File 'lib/querly/cli/formatter.rb', line 29 def fatal_error(error) STDERR.puts Rainbow("Fatal error: #{error}").red STDERR.puts "Backtrace:" STDERR.puts format_backtrace(error.backtrace) end |
#finish ⇒ Object
Called on exit/abort
36 |
# File 'lib/querly/cli/formatter.rb', line 36 def finish; end |
#issue_found(script, rule, pair) ⇒ Object
Called when issue is found
25 |
# File 'lib/querly/cli/formatter.rb', line 25 def issue_found(script, rule, pair); end |
#script_error(path, error) ⇒ Object
Called when failed to load script Continue after the call
22 |
# File 'lib/querly/cli/formatter.rb', line 22 def script_error(path, error); end |
#script_load(script) ⇒ Object
Called when script is successfully loaded
18 |
# File 'lib/querly/cli/formatter.rb', line 18 def script_load(script); end |
#start ⇒ Object
Called when analyzer started
8 |
# File 'lib/querly/cli/formatter.rb', line 8 def start; end |