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

What mehen emits

How to read it

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.