Class: Rigor::CLI::FileEffectiveness
- Inherits:
-
Data
- Object
- Data
- Rigor::CLI::FileEffectiveness
- Defined in:
- lib/rigor/cli/mutation_protection_report.rb
Overview
ADR-63 Tier 2 — aggregates per-file Protection::MutationScanner results into a project-level effectiveness report: the kill ratio (when a type-visible bug was introduced, how often Rigor caught it), the per-file breakdown, and a ranked "add a type here" list keyed by the method whose breakage Rigor most often missed — the sites where a receiver annotation would buy real catching power.
The framing is load-bearing (ADR-63 Criterion A / ADR-62 Criterion A): the number is effectiveness, the
survivors are missed breakages / where to add a type, never "your code is broken".
harness_errors (#264) — mutants where the harness itself raised (a rescued failure), distinguished from
a parse-invalid mutant. Defaults to 0 so existing call sites keep constructing a FileEffectiveness
without the new keyword.
Instance Attribute Summary collapse
-
#harness_errors ⇒ Object
readonly
Returns the value of attribute harness_errors.
-
#killed ⇒ Object
readonly
Returns the value of attribute killed.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#ratio ⇒ Object
readonly
Returns the value of attribute ratio.
-
#survived ⇒ Object
readonly
Returns the value of attribute survived.
Instance Method Summary collapse
-
#initialize(path:, killed:, survived:, ratio:, harness_errors: 0) ⇒ FileEffectiveness
constructor
A new instance of FileEffectiveness.
Constructor Details
#initialize(path:, killed:, survived:, ratio:, harness_errors: 0) ⇒ FileEffectiveness
Returns a new instance of FileEffectiveness.
16 17 18 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 16 def initialize(path:, killed:, survived:, ratio:, harness_errors: 0) super end |
Instance Attribute Details
#harness_errors ⇒ Object (readonly)
Returns the value of attribute harness_errors
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 15 def harness_errors @harness_errors end |
#killed ⇒ Object (readonly)
Returns the value of attribute killed
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 15 def killed @killed end |
#path ⇒ Object (readonly)
Returns the value of attribute path
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 15 def path @path end |
#ratio ⇒ Object (readonly)
Returns the value of attribute ratio
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 15 def ratio @ratio end |
#survived ⇒ Object (readonly)
Returns the value of attribute survived
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_report.rb', line 15 def survived @survived end |