Class: CC::Analyzer::Issue
- Inherits:
-
Object
- Object
- CC::Analyzer::Issue
- Defined in:
- lib/cc/analyzer/issue.rb
Constant Summary collapse
- 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(output) ⇒ Issue
constructor
A new instance of Issue.
- #path ⇒ Object
Constructor Details
#initialize(output) ⇒ Issue
Returns a new instance of Issue.
16 17 18 |
# File 'lib/cc/analyzer/issue.rb', line 16 def initialize(output) @output = output end |
Instance Method Details
#as_json ⇒ Object
20 21 22 23 24 |
# File 'lib/cc/analyzer/issue.rb', line 20 def as_json(*) parsed_output.reverse_merge!( "fingerprint" => fingerprint, ) end |
#fingerprint ⇒ Object
26 27 28 |
# File 'lib/cc/analyzer/issue.rb', line 26 def fingerprint parsed_output.fetch("fingerprint") { default_fingerprint } end |
#path ⇒ Object
37 38 39 |
# File 'lib/cc/analyzer/issue.rb', line 37 def path parsed_output.fetch("location", {}).fetch("path", "") end |