report

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package report formats and prints validation and scoring results. It supports colored terminal output, GitHub Actions annotations, JSON, and Markdown output formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(w io.Writer, results []*judge.CachedResult, skillDir, format string) error

Compare formats cached results in comparison mode.

func Default

func Default(w io.Writer, results []*judge.CachedResult, skillDir, format string) error

Default formats the most recent cached results per file.

func FormatEvalResults

func FormatEvalResults(w io.Writer, results []*evaluate.Result, format, display string) error

FormatEvalResults formats a single EvalResult in the given format.

func FormatMultiEvalResults

func FormatMultiEvalResults(w io.Writer, results []*evaluate.Result, format, display string) error

FormatMultiEvalResults formats multiple EvalResults in the given format.

func List

func List(w io.Writer, results []*judge.CachedResult, skillDir, format string) error

List formats cached results in list mode.

func Print

func Print(w io.Writer, r *types.Report, perFile bool)

Print writes a human-readable validation report to w. When perFile is true, per-file content and contamination analysis sections are included.

func PrintAnnotations

func PrintAnnotations(w io.Writer, r *types.Report, workDir string)

PrintAnnotations writes GitHub Actions workflow command annotations for errors and warnings in the report. Pass and Info results are skipped. workDir is the working directory used to compute relative file paths; in CI this is typically the repository root.

func PrintEvalJSON

func PrintEvalJSON(w io.Writer, results []*evaluate.Result) error

PrintEvalJSON writes results as indented JSON.

func PrintEvalMarkdown

func PrintEvalMarkdown(w io.Writer, result *evaluate.Result, display string)

PrintEvalMarkdown writes a single EvalResult as Markdown.

func PrintEvalText

func PrintEvalText(w io.Writer, result *evaluate.Result, display string)

PrintEvalText writes a human-readable text representation of an EvalResult.

func PrintJSON

func PrintJSON(w io.Writer, r *types.Report, perFile bool) error

PrintJSON writes the report as JSON to the given writer.

func PrintMarkdown

func PrintMarkdown(w io.Writer, r *types.Report, perFile bool) error

PrintMarkdown writes the report as GitHub-flavored markdown to the given writer.

func PrintMulti

func PrintMulti(w io.Writer, mr *types.MultiReport, perFile bool)

PrintMulti prints each skill report separated by a line, with an overall summary.

func PrintMultiAnnotations

func PrintMultiAnnotations(w io.Writer, mr *types.MultiReport, workDir string)

PrintMultiAnnotations writes annotations for all skills in a multi-report.

func PrintMultiEvalMarkdown

func PrintMultiEvalMarkdown(w io.Writer, results []*evaluate.Result, display string)

PrintMultiEvalMarkdown writes multiple EvalResults as Markdown, separated by rules.

func PrintMultiJSON

func PrintMultiJSON(w io.Writer, mr *types.MultiReport, perFile bool) error

PrintMultiJSON writes the multi-skill report as JSON to the given writer.

func PrintMultiMarkdown

func PrintMultiMarkdown(w io.Writer, mr *types.MultiReport, perFile bool) error

PrintMultiMarkdown writes the multi-skill report as GitHub-flavored markdown.

Types

type EvalJSONOutput

type EvalJSONOutput struct {
	Skills []EvalJSONSkill `json:"skills"`
}

EvalJSONOutput is the top-level JSON envelope.

type EvalJSONRef

type EvalJSONRef struct {
	File   string `json:"file"`
	Scores any    `json:"scores"`
}

EvalJSONRef is one reference file entry in JSON output.

type EvalJSONSkill

type EvalJSONSkill struct {
	SkillDir     string        `json:"skill_dir"`
	SkillScores  any           `json:"skill_scores,omitempty"`
	RefScores    []EvalJSONRef `json:"reference_scores,omitempty"`
	RefAggregate any           `json:"reference_aggregate,omitempty"`
}

EvalJSONSkill is one skill entry in JSON output.

Jump to

Keyboard shortcuts

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