Documentation
¶
Index ¶
- func ColorizeJSON(raw []byte) []byte
- func FixHint(ruleID string) (string, bool)
- func FormatJSON(payload any, pretty bool) ([]byte, error)
- func RenderJSONError(specFile string, exitCode int, message string, debug *Debug) (any, jsonSummary, error)
- func RenderJSONReport(specFile string, report validate.Report, exitCode int, debug *Debug) (any, jsonSummary, error)
- func RenderReport(r validate.Report) string
- type CheckResult
- type ClassicRenderer
- type Debug
- type HumanRenderer
- type RenderOptions
- type ReportRenderer
- type Verdict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeJSON ¶
ColorizeJSON adds ANSI colors to severity values for terminal display.
func FormatJSON ¶
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 ¶
RenderReport is kept for compatibility with existing callers.
Types ¶
type CheckResult ¶
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 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.