Class: CC::Analyzer::Issue
- Inherits:
-
Object
- Object
- CC::Analyzer::Issue
- Defined in:
- lib/cc/analyzer/issue.rb
Constant Summary collapse
- DEFAULT_SEVERITY =
IssueValidations::SeverityValidation::MINOR
- DEPRECATED_SEVERITY =
IssueValidations::SeverityValidation::NORMAL
- SPEC_ISSUE_ATTRIBUTES =
%w[ categories check_name content description location other_locations remediation_points severity type ]
Instance Method Summary collapse
- #as_json ⇒ Object
- #fingerprint ⇒ Object
-
#initialize(engine_name, output) ⇒ Issue
constructor
A new instance of Issue.
- #path ⇒ Object
Constructor Details
#initialize(engine_name, output) ⇒ Issue
Returns a new instance of Issue.
19 20 21 22 |
# File 'lib/cc/analyzer/issue.rb', line 19 def initialize(engine_name, output) @engine_name = engine_name @output = output end |
Instance Method Details
#as_json ⇒ Object
24 25 26 27 28 29 |
# File 'lib/cc/analyzer/issue.rb', line 24 def as_json(*) parsed_output.reverse_merge!( "engine_name" => engine_name, "fingerprint" => fingerprint, ).merge!("severity" => severity) end |
#fingerprint ⇒ Object
31 32 33 |
# File 'lib/cc/analyzer/issue.rb', line 31 def fingerprint parsed_output.fetch("fingerprint") { default_fingerprint } end |
#path ⇒ Object
42 43 44 |
# File 'lib/cc/analyzer/issue.rb', line 42 def path parsed_output.fetch("location", {}).fetch("path", "") end |