The GitHub Action accepts aDocumentation Index
Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt
Use this file to discover all available pages before exploring further.
thresholds input that gates PRs on adverse
per-file metric deltas. This page explains how thresholds compose with the JSON output of
mehen diff and how to write your own gating logic in CI.
Action threshold input
mehen diff and then evaluates each per-file delta against the supplied limits. A
violation:
- Counts toward the
violationsoutput. - Fails the action when
fail-on-threshold: true(default).
Adverse direction
Each metric has an adverse direction. Thresholds limit how far in the adverse direction a per-file delta is allowed to go:| Metric | Adverse | Example threshold |
|---|---|---|
cyclomatic | ↑ | cyclomatic=5 blocks a per-file increase by more than 5. |
cognitive | ↑ | cognitive=4. |
loc.lloc | ↑ | loc.lloc=120. |
mi.visual_studio | ↓ | mi.visual_studio=10 blocks a per-file decrease by more than 10. |
halstead.volume | ↑ | halstead.volume=200. |
Composition with diff JSON
If you want richer logic than the action provides, runmehen diff -O json yourself and pipe the JSON
into a CI script:
jq and the JSON shape give you full control. The downside: you reimplement adversity rules.
See also
- GitHub Action — full input/output reference.
- Commands → diff —
mehen diffCLI reference. - Output formats — JSON shape.