Class: PmdTester::CpdReportDiff
- Inherits:
-
Object
- Object
- PmdTester::CpdReportDiff
- Includes:
- PmdTester
- Defined in:
- lib/pmdtester/cpd_report_diff.rb
Overview
This class represents all the diff report information, including the summary information of the original cpd reports, as well as the specific information of the diff report.
Constant Summary
Constants included from PmdTester
BASE, PATCH, PR_NUM_ENV_VAR, VERSION
Instance Attribute Summary collapse
-
#base_report ⇒ Object
Returns the value of attribute base_report.
-
#duplication_counts ⇒ Object
readonly
Returns the value of attribute duplication_counts.
-
#duplication_diffs ⇒ Object
readonly
Returns the value of attribute duplication_diffs.
-
#error_counts ⇒ Object
readonly
Returns the value of attribute error_counts.
-
#error_diffs ⇒ Object
readonly
Returns the value of attribute error_diffs.
-
#patch_report ⇒ Object
Returns the value of attribute patch_report.
Instance Method Summary collapse
-
#initialize(base_report:, patch_report:) ⇒ CpdReportDiff
constructor
A new instance of CpdReportDiff.
Methods included from PmdTester
Constructor Details
#initialize(base_report:, patch_report:) ⇒ CpdReportDiff
Returns a new instance of CpdReportDiff.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 47 def initialize(base_report:, patch_report:) @duplication_counts = RunningDiffCounters.new(base_report.duplications.size) @error_counts = RunningDiffCounters.new(base_report.errors.size) @base_report = base_report @patch_report = patch_report @duplication_diffs = [] @error_diffs = [] diff_base_with_patch end |
Instance Attribute Details
#base_report ⇒ Object
Returns the value of attribute base_report.
45 46 47 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 45 def base_report @base_report end |
#duplication_counts ⇒ Object (readonly)
Returns the value of attribute duplication_counts.
44 45 46 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 44 def duplication_counts @duplication_counts end |
#duplication_diffs ⇒ Object (readonly)
Returns the value of attribute duplication_diffs.
44 45 46 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 44 def duplication_diffs @duplication_diffs end |
#error_counts ⇒ Object (readonly)
Returns the value of attribute error_counts.
44 45 46 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 44 def error_counts @error_counts end |
#error_diffs ⇒ Object (readonly)
Returns the value of attribute error_diffs.
44 45 46 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 44 def error_diffs @error_diffs end |
#patch_report ⇒ Object
Returns the value of attribute patch_report.
45 46 47 |
# File 'lib/pmdtester/cpd_report_diff.rb', line 45 def patch_report @patch_report end |