CorpusMetrics class
The full corpus result: per-rule metrics plus authoring warnings.
- Annotations
-
- @experimental
Constructors
-
CorpusMetrics({required Map<
String, RuleMetrics> byRule, List<String> warnings = const []}) -
Creates a CorpusMetrics.
const
-
CorpusMetrics.fromJson(Map<
String, dynamic> json) -
Parses CorpusMetrics from
json(used to load a committed baseline).factory
Properties
-
byRule
→ Map<
String, RuleMetrics> -
Metrics keyed by rule id.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
rules
→ List<
RuleMetrics> -
The rules, in a stable (sorted) order.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
warnings
→ List<
String> -
Non-fatal authoring problems noticed while scoring (e.g. an expected
finding whose identifier did not resolve).
final
Methods
-
gateViolations(
{required Map< String, Confidence> confidenceByRule, Map<String, double> heuristicPrecisionThresholds = const {}, CorpusMetrics? baseline, double recallTolerance = 0.02}) → List<GateViolation> - Evaluates the CI gate. Returns every breach; an empty list means the gate passes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
renderTable(
) → String - A fixed-width table for humans, one row per rule.
-
toJson(
) → Map< String, dynamic> - The JSON representation: a rule list plus any warnings.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited