When GitLab Duo runs static complexity analysis on your merge request, it measures cyclomatic complexity for every function you touched or added. This helps catch overly complex code before it gets merged.
There are two ways the analysis can run:
| Method | Accuracy | How it works |
|---|---|---|
| Tool-based (radon) | Precise | Runs radon directly on your source files |
| LLM-approximated | Estimated | The AI reads your code and counts decision points manually |
If you saw an info box in the MR comment about improving accuracy, read on.