MaintainabilityIndexCalculator class
Calculates the Maintainability Index for Dart code.
MI = max(0, (171 - 5.2×ln(V) - 0.23×G - 16.2×ln(LOC)) × 100/171)
Where:
- V = Halstead Volume
- G = Cyclomatic Complexity
- LOC = Lines of Code
Constructors
- MaintainabilityIndexCalculator([ComplexityCalculator? calculator])
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
-
calculate(
FunctionBody body, [LineInfo? lineInfo]) → MaintainabilityResult - Calculates the maintainability index for a function/method.
-
calculateForFile(
CompilationUnit unit) → FileMaintainabilityResult - Calculates MI for a compilation unit (file-level).
-
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