What mehen emits
Why both functions and closures are reported
Closures are first-class values in TypeScript, Rust, Ruby, Kotlin, Python, etc. Mixing closure parameter counts with named-function parameter counts hides the long-tail of inline lambdas. mehen reports both buckets so you can see, for example, that a file’s named functions average 2 arguments while its callbacks average 4.How to read it
Conventional ceilings (no universal authority — pick one for your repo):
Robert C. Martin’s Clean Code recommends ≤ 3 as a soft cap; it’s a stylistic preference, not a hard
rule.
References
- Sonar: Metrics definitions.
- Martin, R. C. (2008). Clean Code, ch. 3. (Soft cap of 3 for “ideal” function arity.)