Findings: format and reporting
Finding shape (check --format json)
A JSON array; each element:
| Field | Meaning |
|---|---|
rule-id | RM-<CATEGORY>-<NNN>, e.g. RM-STRUCT-008 |
severity | error | warning | info | hint |
location.file | path relative to the analyzed root |
location.range | byte range {start, end} |
message | the demand, phrased as the canonical form’s requirement |
rationale-uri | rustmanifest://methodology/<doc>#<anchor> — resolves to the methodology excerpt behind the rule |
trace | array of {fact, reason} steps — the derivation, one line per recorded fact |
Convert byte offsets to line numbers before quoting a location:
awk/python on the file, or quote the message with the enclosing item name
instead of a raw offset.
Severity ladder
error— a provable defect or security exposure; always report individually.warning— a deviation with a real cost; report individually when few, group by rule when many.info— a measured observation; summarize.hint— a canonical-form nudge with a small price; summarize with counts.
Rule categories (middle segment of the id)
SEC— security (hardcoded credentials, injection surfaces, leaks).IO— outside-world effects and their boundaries (fs, net, process, db).MEM— memory and layout costs.STRUCT— module/type structure (encapsulation, layering, module size).QUAL— quality and maintainability.META— engine/meta rules.
Report template
Use this shape for any review answer:
# Review of <scope>
<one line: N findings — X error, Y warning, Z info, W hint>
## Errors
- `RM-SEC-001` <file>:<line> — <message>
Why: <one line from trace> · Rationale: <rationale-uri>
## Warnings
<same shape, or grouped per rule when a rule fires many times:
`RM-STRUCT-008` fires 41× — <message>; locations: a, b, c …>
## Summarized tail
<info/hint counts per rule category, one line each>
## Coverage note
<if coverage is not full, say what the engine could not see>
Rules of honest presentation:
- Cite rule id + location for every finding you mention; the reader must be
able to re-run
checkand match your list. - Never merge two rules into one bullet, never round counts away.
- If the engine returned zero findings, say the scope is clean per the engine
— and note coverage limits if
coverageshows unresolved imports. - When you add your own opinion beyond the engine’s output, mark it clearly as your own note, separate from findings.