MetricsThresholds class

Metrics thresholds for violation detection.

Defines acceptable ranges for code quality metrics. Functions that exceed these thresholds are flagged as violations (hotspots).

Example:

final aggregator = MetricsAggregator(
  thresholds: MetricsThresholds(
    minMaintainability: 60.0,  // Stricter than default
    maxCyclomatic: 15,
    maxCognitive: 10,
    maxLinesOfCode: 50,
  ),
);

Constructors

MetricsThresholds({double minMaintainability = 50.0, int maxCyclomatic = 20, int maxCognitive = 15, int maxLinesOfCode = 100})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxCognitive int
Maximum acceptable cognitive complexity.
final
maxCyclomatic int
Maximum acceptable cyclomatic complexity.
final
maxLinesOfCode int
Maximum acceptable lines of code per function.
final
minMaintainability double
Minimum acceptable maintainability index.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited