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.

PLOC (Physical Lines of Code) counts source lines that contain at least one code token. Pure comment lines and pure blank lines are excluded.

What mehen emits

KeyTypeDescription
loc.plocintPhysical instruction lines.

How it is computed

A line counts toward PLOC when the parser reports at least one non-trivia token on it. Lines that hold only whitespace, only block-comment continuation, or only line-comment text are excluded. Mixed lines (code followed by an inline comment) count as PLOC.

When it is useful

  • “Real code” size: PLOC strips out comments and blanks, so it is closer to what reviewers think of as the size of a file.
  • Comparing comment density: pair with CLOC to compute the comment ratio cloc / (cloc + ploc).
  • Maintainability inputs: PLOC is one of the inputs to the Maintainability Index.

Equivalents in other tools

ToolEquivalent
Sonarncloc (non-comment lines of code).
cloc (CLI)“code” column.
Visual Studio MI calculation”lines of code” input.

References

See also