baseline

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fingerprint

func Fingerprint(f *analyzer.Finding) string

Fingerprint computes a stable identifier for a finding.

func Save

func Save(path string, findings []analyzer.Finding) error

Save writes the baseline to a file.

Types

type Baseline

type Baseline struct {
	Fingerprints []string `json:"fingerprints"`
	// contains filtered or unexported fields
}

Baseline holds fingerprints of previously seen findings.

func Load

func Load(path string) (*Baseline, error)

Load reads a baseline file. Returns an empty baseline if the file does not exist.

func (*Baseline) Contains

func (b *Baseline) Contains(f *analyzer.Finding) bool

Contains returns true if the finding's fingerprint is in the baseline.

func (*Baseline) Filter

func (b *Baseline) Filter(findings []analyzer.Finding) ([]analyzer.Finding, int)

Filter removes baselined findings and returns the remaining ones. Returns the filtered list and the number of suppressed findings.

Jump to

Keyboard shortcuts

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