Documentation
¶
Overview ¶
Package report renders scan results for humans (colored terminal) and machines (JSON), and decides the process exit code for CI gating.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitCode ¶
ExitCode implements CI gating: 0 below threshold, 2 at/above it, 3 when analysis errors occurred and failOnError is set.
Types ¶
type Meta ¶
type Meta struct {
Version string // tool version stamp
Targets []string // lockfiles scanned, or "cli" for check mode
FailOn string // configured threshold, so consumers know the gate
}
Meta carries run-level context the CLI knows and the report layer doesn't.
type Summary ¶
type Summary struct {
Scanned int `json:"scanned"`
Errors int `json:"errors"`
Suppressed int `json:"suppressed"`
Elapsed time.Duration `json:"elapsed_ns"`
ByRisk map[string]int `json:"by_risk"`
Results []analyzer.Result `json:"results"`
// contains filtered or unexported fields
}
Summary aggregates a full run.
Click to show internal directories.
Click to hide internal directories.