Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultFileName is the default baseline snapshot file path. DefaultFileName = ".promptinel-baseline.json" // SnapshotVersion is the current baseline file format version. SnapshotVersion = 1 )
Variables ¶
This section is empty.
Functions ¶
func FilterFindings ¶
func FilterFindings(findings []engine.FileFinding, snapshot Snapshot) []engine.FileFinding
FilterFindings removes findings already accepted by the provided snapshot.
func HashFinding ¶
func HashFinding(finding engine.FileFinding) string
HashFinding returns a deterministic hash for one finding.
Types ¶
type Entry ¶
type Entry struct {
Hash string `json:"hash"`
Path string `json:"path"`
RuleID string `json:"rule_id"`
Severity config.Severity `json:"severity"`
Message string `json:"message"`
Line int `json:"line"`
Column int `json:"column"`
}
Entry represents one accepted finding.
type Snapshot ¶
Snapshot stores accepted findings in a deterministic representation.
func BuildSnapshot ¶
func BuildSnapshot(findings []engine.FileFinding) Snapshot
BuildSnapshot converts findings into a deterministic baseline snapshot.
Click to show internal directories.
Click to hide internal directories.