Documentation
¶
Overview ¶
Package report defines the validated, deterministic lintpal.report.v1 artifact.
Index ¶
- Constants
- Variables
- func MeetsGate(artifact Report, threshold Threshold) (bool, error)
- func Validate(report Report) error
- func WriteAndGate(writer io.Writer, artifact Report, format Format, threshold Threshold) error
- func WriteHuman(writer io.Writer, artifact Report) error
- func WriteJSON(writer io.Writer, artifact Report) error
- type Diagnostic
- type Evidence
- type Format
- type Report
- type Skip
- type Stats
- type Threshold
Constants ¶
View Source
const SchemaVersion = "lintpal.report.v1"
Variables ¶
View Source
var ErrExport = errors.New("lint report export failed")
View Source
var ErrGate = errors.New("lint severity gate failed")
View Source
var ErrInvalidFormat = errors.New("invalid lint report format")
View Source
var ErrInvalidReport = errors.New("invalid lint report")
View Source
var ErrInvalidThreshold = errors.New("invalid lint severity threshold")
Functions ¶
func Validate ¶
Validate checks the public artifact before it is rendered or gated. Exact changed-line provenance is checked by New, which has the Git work items.
func WriteAndGate ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
RuleID string `json:"rule_id"`
WorkItemID string `json:"work_item_id"`
Severity rules.Severity `json:"severity"`
Path string `json:"path"`
Side git.Side `json:"side"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Title string `json:"title"`
Message string `json:"message"`
Provider string `json:"provider"`
Model string `json:"model"`
Evidence Evidence `json:"evidence"`
}
type Report ¶
type Skip ¶
type Skip struct {
OldPath string `json:"old_path,omitempty"`
NewPath string `json:"new_path,omitempty"`
Reason git.SkipReason `json:"reason"`
}
Click to show internal directories.
Click to hide internal directories.