output

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorizeJSON

func ColorizeJSON(raw []byte) []byte

ColorizeJSON adds ANSI colors to severity values for terminal display.

func FixHint

func FixHint(ruleID string) (string, bool)

FixHint returns a deterministic remediation hint for a rule code.

func FormatJSON

func FormatJSON(payload any, pretty bool) ([]byte, error)

FormatJSON renders the payload as JSON, optionally pretty printed.

func RenderJSONError

func RenderJSONError(specFile string, exitCode int, message string, debug *Debug) (any, jsonSummary, error)

RenderJSONError builds a JSON error response when findings cannot be produced.

func RenderJSONReport

func RenderJSONReport(specFile string, report validate.Report, exitCode int, debug *Debug) (any, jsonSummary, error)

RenderJSONReport renders a report to JSON with the required schema.

func RenderReport

func RenderReport(r validate.Report) string

RenderReport is kept for compatibility with existing callers.

Types

type CheckResult

type CheckResult struct {
	Target   string
	Report   validate.Report
	ExitCode int
}

CheckResult holds all data required by human renderers.

type ClassicRenderer

type ClassicRenderer struct{}

ClassicRenderer preserves the original human-readable output format.

func (ClassicRenderer) Render

func (ClassicRenderer) Render(result CheckResult, _ RenderOptions) string

Render renders a report in classic mode.

type Debug

type Debug struct {
	InternalError string `json:"internal_error"`
	Stacktrace    string `json:"stacktrace"`
}

type HumanRenderer

type HumanRenderer interface {
	Render(result CheckResult, opts RenderOptions) string
}

HumanRenderer renders human-readable output.

type RenderOptions

type RenderOptions struct {
	Width int
}

RenderOptions controls human output formatting.

type ReportRenderer

type ReportRenderer struct{}

ReportRenderer renders the structured interactive report format.

func (ReportRenderer) Render

func (ReportRenderer) Render(result CheckResult, opts RenderOptions) string

Render renders a report in structured report mode.

type Verdict

type Verdict string

Jump to

Keyboard shortcuts

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