ComplexityCalculator class

Calculates various complexity metrics for Dart code.

Constructors

ComplexityCalculator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

calculateCognitiveComplexity(AstNode node) int
Calculates cognitive complexity for a function/method.
calculateCyclomaticComplexity(AstNode node) int
Calculates cyclomatic complexity for a function/method.
calculateHalsteadMetrics(AstNode node) HalsteadMetrics
Calculates Halstead metrics for a function/method.
calculateMaintainabilityIndex({required double halsteadVolume, required int cyclomaticComplexity, required int linesOfCode}) double
Calculates maintainability index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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