Documentation
¶
Overview ¶
Package baseline implements the adoption baseline (PRD RF-08): a committed snapshot of a project's findings so that, with baseline enabled, codefit reports only new findings while pre-existing debt is recorded (baselined: true) and does not block. This makes adopting codefit on an existing project painless (Scenario B).
Status: SKELETON. This declares the Snapshot type and the Store contract. The snapshot/diff logic and the on-disk format (.codefit/baseline.json) are implemented in Fase 1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot struct {
// Fingerprints holds the stable identity of each baselined finding.
Fingerprints []string `json:"fingerprints"`
CreatedAt string `json:"created_at"`
Commit string `json:"commit,omitempty"`
}
Snapshot is a recorded set of findings (identified by a stable fingerprint) captured at a point in time. Findings present in the snapshot are historical debt; findings absent from it are new.
type Store ¶
type Store interface {
// Take snapshots the given findings as the new baseline.
Take(fs []findings.Finding) (Snapshot, error)
// Mark flags findings already present in the snapshot as Baselined.
Mark(snap Snapshot, fs []findings.Finding) []findings.Finding
}
Store persists and applies a baseline.
Skeleton: no implementation yet (Fase 1).