What mehen emits
Published on the file’s root space (file-level totals from the report’s own function
records). Absent when the format records no functions — a Go coverprofile has none, and Clover
only knows the
method lines its instrumenter marked.
Where the records come from
Note the subtle relationship with the per-function line coverage mehen also publishes: the
file-level
coverage.function above comes from the report’s own records, while each function
space in the metric tree carries coverage.line/coverage.branch computed from mehen’s own
parse of the function’s line span. The two views agree on what “untested function” means but
serve different queries — “how many of this file’s functions run at all?” versus “how covered is
this function?”. The per-space values are the ones the CRAP composite will consume, because
they exist even for formats without function records.
How to read it
Gating
See also
- Line coverage — depth within the functions this metric counts.
- Branch coverage — outcome-level depth.
- NOM — how many functions a file defines in the first place.
References
- Crap4j — the original method-granularity CRAP implementation.
- Savoia, A., & Evans, B. (2007). The CRAP metric.
- geninfo(1) —
FN/FNDArecord semantics. - Ivanković, M., Petrović, G., Just, R., & Fraser, G. (2019). Code coverage at Google. ESEC/FSE 2019.