Understanding the metrics Spec This uses to measure code complexity and quality
Spec This analyzes your codebase and measures various complexity metrics to help you identify problematic code early. These metrics are based on industry-standard measures of code quality and maintainability.
Each metric has its own dedicated page with:
These metrics evaluate individual functions, classes, and methods.
Measures the maximum levels of nested code blocks (if, loops, try-catch). Deep nesting makes code harder to read and understand.
Counts decision points (if, switch, loops, logical operators). More branches means more paths to test and higher complexity.
Counts executable statements in a function, excluding comments and blank lines. Long functions are harder to test and maintain.
These metrics assess entire source files.
These metrics evaluate the overall health of your codebase.
You can configure alert thresholds in your Organization Settings. Spec This provides three preset sensitivity levels:
You can also set custom thresholds for each metric individually to match your team's coding standards.
Metric value significantly exceeds threshold (200%+). Immediate attention recommended.
Metric value moderately exceeds threshold (120-200%). Should be addressed soon.
Metric value slightly exceeds threshold (100-120%). Worth monitoring.
Click on any metric in the sidebar or above to learn: