Class: MetzScan::Analyzers::RepeatedBranching::Finding
- Inherits:
-
Struct
- Object
- Struct
- MetzScan::Analyzers::RepeatedBranching::Finding
- Defined in:
- lib/metz_scan/analyzers/repeated_branching.rb
Instance Attribute Summary collapse
-
#branch_values ⇒ Object
Returns the value of attribute branch_values.
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#decision ⇒ Object
Returns the value of attribute decision.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#message ⇒ Object
Returns the value of attribute message.
-
#occurrences ⇒ Object
Returns the value of attribute occurrences.
-
#project_analyzer_metadata ⇒ Object
Returns the value of attribute project_analyzer_metadata.
-
#project_analyzer_status ⇒ Object
Returns the value of attribute project_analyzer_status.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#source ⇒ Object
Returns the value of attribute source.
-
#suggested_next_moves ⇒ Object
Returns the value of attribute suggested_next_moves.
-
#triage_severity ⇒ Object
Returns the value of attribute triage_severity.
-
#triage_summary ⇒ Object
Returns the value of attribute triage_summary.
-
#why_it_matters ⇒ Object
Returns the value of attribute why_it_matters.
Instance Method Summary collapse
Instance Attribute Details
#branch_values ⇒ Object
Returns the value of attribute branch_values
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def branch_values @branch_values end |
#confidence ⇒ Object
Returns the value of attribute confidence
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def confidence @confidence end |
#decision ⇒ Object
Returns the value of attribute decision
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def decision @decision end |
#kind ⇒ Object
Returns the value of attribute kind
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def kind @kind end |
#message ⇒ Object
Returns the value of attribute message
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def @message end |
#occurrences ⇒ Object
Returns the value of attribute occurrences
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def occurrences @occurrences end |
#project_analyzer_metadata ⇒ Object
Returns the value of attribute project_analyzer_metadata
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def @project_analyzer_metadata end |
#project_analyzer_status ⇒ Object
Returns the value of attribute project_analyzer_status
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def project_analyzer_status @project_analyzer_status end |
#rule_id ⇒ Object
Returns the value of attribute rule_id
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def rule_id @rule_id end |
#source ⇒ Object
Returns the value of attribute source
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def source @source end |
#suggested_next_moves ⇒ Object
Returns the value of attribute suggested_next_moves
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def suggested_next_moves @suggested_next_moves end |
#triage_severity ⇒ Object
Returns the value of attribute triage_severity
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def triage_severity @triage_severity end |
#triage_summary ⇒ Object
Returns the value of attribute triage_summary
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def triage_summary @triage_summary end |
#why_it_matters ⇒ Object
Returns the value of attribute why_it_matters
28 29 30 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 28 def why_it_matters @why_it_matters end |
Instance Method Details
#context_name(occurrence) ⇒ Object
36 37 38 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 36 def context_name(occurrence) [occurrence.enclosing_name, occurrence.method_name].compact.join.then { |name| name unless name.empty? } end |
#report_occurrences ⇒ Object
32 33 34 |
# File 'lib/metz_scan/analyzers/repeated_branching.rb', line 32 def report_occurrences occurrences.map { |occurrence| Occurrence.from(occurrence, context: context_name(occurrence)) } end |