report

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTable

func PrintTable(w io.Writer, fs []checks.Finding)

PrintTable writes a simple tabular report to the provided writer. The format is stable and greppable, which helps in CI logs.

func PrintVerboseTable added in v0.3.0

func PrintVerboseTable(w io.Writer, out Output)

PrintVerboseTable writes a summary plus per-check status details.

Types

type CheckStatus added in v0.3.0

type CheckStatus struct {
	Check        string       `json:"check"`
	Description  string       `json:"description"`
	Status       string       `json:"status"`
	Level        checks.Level `json:"level,omitempty"`
	Findings     int          `json:"findings"`
	WhyImportant string       `json:"why_important,omitempty"`
	HowToResolve string       `json:"how_to_resolve,omitempty"`
}

CheckStatus describes pass/fail status for an executed check.

type Output

type Output struct {
	Summary  string           `json:"summary"`
	Checks   []CheckStatus    `json:"checks"`
	Findings []checks.Finding `json:"findings"`
	Counts   struct {
		Info  int `json:"info"`
		Warn  int `json:"warn"`
		Error int `json:"error"`
	} `json:"counts"`
}

Output represents a summary view of findings for JSON output. It flattens the data and provides quick counts per severity.

func FromFindings

func FromFindings(fs []checks.Finding) Output

FromFindings converts a slice of findings into an Output, computing counts.

func FromRun added in v0.3.0

func FromRun(statuses []CheckStatus, fs []checks.Finding) Output

FromRun builds an output payload with per-check statuses and findings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL