The Lines of Code (LOC) family is the simplest size metric mehen reports — and one of the oldest. A single number is misleading, so mehen separates physical lines, instruction lines, statements, comments, and blanks.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 | Page | Counts |
|---|---|---|
loc.sloc | SLOC | Every physical line, including comments and blanks. |
loc.ploc | PLOC | Physical instruction lines (excludes comments and blanks). |
loc.lloc | LLOC | Logical lines — statements per the language’s grammar. |
loc.cloc | CLOC | Comment lines (line, block, and doc comments). |
loc.blank | Blank | Whitespace-only lines. |
loc | — | Alias for loc.sloc. |
Worked example
| Metric | Value |
|---|---|
loc.sloc | 11 |
loc.ploc | 3 |
loc.lloc | 1 |
loc.cloc | 6 |
loc.blank | 2 |
Why split the count
The LOC family separates concerns that “lines of code” conflates:- SLOC is the simplest size signal — useful for repository-level dashboards.
- PLOC removes whitespace and comments and is closest to “real code”.
- LLOC counts statements, so it is the right axis for comparing language idioms (one Python comprehension vs. a multi-line Rust loop).
- CLOC and Blank are reported separately because comment and whitespace ratios are themselves signals of style and readability.
References
- Park, R. E. (1992). Software Size Measurement: A Framework for Counting Source Statements. CMU/SEI-92-TR-20, Software Engineering Institute, Carnegie Mellon. SEI report — the standard reference for what does and does not count as a “line”.
- Nguyen, V., Deeds-Rubin, S., Tan, T. & Boehm, B. (2007). A SLOC Counting Standard. USC Center for Systems and Software Engineering Technical Report. USC PDF.
- Sonar: Lines of code in metric definitions.
See also
- Concepts → Spaces — how the LOC family aggregates from spaces to files.
- Developers → How-to: implement LoC — internal implementation guide.