CognitiveComplexityAnalyzer class

Analyzes Dart source code to calculate cognitive complexity.

Cognitive complexity measures how difficult code is to understand by penalizing nested structures and control flow breaks more heavily than simple decision points. Unlike cyclomatic complexity, it focuses on human readability.

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

analyze(String sourceCode) CognitiveResult
Analyzes the given Dart source code and returns cognitive complexity metrics.
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