baseline

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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).

Jump to

Keyboard shortcuts

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