NEXITS counts the number of exit points each function/method has. The classic structured-programming recommendation is one exit per function — a high NEXITS suggests the function ought to be split.Documentation Index
Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt
Use this file to discover all available pages before exploring further.
What mehen emits
| Key | Type | Description |
|---|---|---|
nexit | int | Total exit points across functions in the space. |
nexit.average | float | Mean exit-point count per function. |
nexit.min | int | Minimum across functions. |
nexit.max | int | Maximum across functions. |
nexit.sum | int | Sum across child spaces. |
What counts as an exit
Each language analyzer maps its language’s exit-flow constructs:returnand value-returning expressions.throw/raise/panic!statements.yield/yield return(generator functions).exit,os.exit, and the equivalent process-exit calls where unambiguous.- Labeled
breakthat exits the function (rare in practice).
How to read it
nexit | Interpretation |
|---|---|
| 1 | Single exit point — classic structured style. |
| 2–4 | Pragmatic — early returns for guard clauses are a popular style. |
| 5+ | Function does multiple things — extract methods. |
References
- Dijkstra, E. W. (1968). Go To Statement Considered Harmful. Communications of the ACM, 11(3).
- Sonar: Metrics definitions.
See also
- Cyclomatic complexity — exit points are not branches; they’re orthogonal.
- NARGS — argument count.
- NOM — number of methods.