Skip to main content

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.

NOM (Number of Methods) counts how many functions and closures live inside a unit (file, trait, class, or module).

What mehen emits

KeyTypeDescription
nomintTotal methods (named functions + closures).
nom.functionsintNumber of named functions.
nom.closuresintNumber of closures/lambdas.
nom.functions_min / _max / _averageAggregates across child spaces.
nom.closures_min / _max / _averageAggregates across child spaces.
nom.average_functions / nom.average_closuresfloatMeans per child space.
nom.total_functions / nom.total_closuresintAliases of nom.functions and nom.closures.

How to read it

nomInterpretation
1–10Small file/class; usually fine.
11–25Medium; expected in most app-layer code.
26+Likely a god-class candidate; pair with WMC to confirm.
The split between nom.functions and nom.closures is informative. A file with 5 named functions and 50 closures is usually a callback-heavy piece (e.g., an event-driven module).

References

  • Chidamber, S. R. & Kemerer, C. F. (1994). A Metrics Suite for Object Oriented Design. IEEE TSE. DOI. (NOM is one of the original CK metrics.)
  • Sonar: Metrics definitionsfunctions count.

See also

  • WMC — weighted methods per class (uses NOM as a divisor in some implementations).
  • NPM — public methods only.
  • NPA — public attributes.