Documentation
¶
Overview ¶
Package rules loads declarative lint rules and maps typed Jev answers to deterministic decisions. Repository-provided rule files are untrusted data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDecision = errors.New("invalid rule decision")
View Source
var ErrInvalidPack = errors.New("invalid rule pack")
View Source
var ErrInvalidRule = errors.New("invalid rule")
View Source
var ErrPackLimit = errors.New("rule pack limit exceeded")
View Source
var ErrUnsupportedSchema = errors.New("unsupported rule pack schema")
Functions ¶
Types ¶
type Decision ¶
type Decision struct {
RuleID string
WorkItemID string
Path string
Side git.Side
StartLine int
EndLine int
Severity Severity
Title string
Message string
Kind string
Value float64
Confidence *float64
}
Decision carries fixed rule metadata, immutable Git coordinates, and one validated numeric signal. Value is a probability for Noul/Choice and a normalized score for Score; Kind names that distinction.
type Pack ¶
type Pack struct {
// contains filtered or unexported fields
}
func LoadContext ¶
LoadContext adds cancellation to bounded rule loading for CI callers.
Click to show internal directories.
Click to hide internal directories.