evidence

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 8 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 evidence resolves the evidence references that documents in this repository cite, so a checker can fail when a cited test, CI job or file no longer exists. It is shared by tools/threatmodelcheck (docs/threat-model.md) and tools/checklistcheck (docs/release/v1-checklist.md).

References are backticked in the documents and carry a kind prefix:

  • `test:<dir>.<Func>`: a test function named <Func> with the signature go test runs (func TestX(t *testing.T), FuzzX(f *testing.F), BenchmarkX(b *testing.B) or ExampleX()) in a *_test.go file directly in <dir> (repo-relative, forward slashes). Any build tag counts (e2e, benchmark, an OS) except one that no build can satisfy, such as //go:build ignore: go test never runs such a file;
  • `job:<workflow>/<job id>`: a job id under jobs: in .github/workflows/<workflow>;
  • `file:<path>`: a repo-relative file or directory.

Index

Constants

View Source
const Workflows = ".github/workflows"

Workflows is the directory of the GitHub Actions workflows, relative to the root.

Variables

This section is empty.

Functions

func CleanRel

func CleanRel(ref string) string

CleanRel returns ref as a clean repo-relative slash path, or "" when it is absolute or leaves the root.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver resolves references against one repository root, caching parsed workflows.

func New

func New(root string) *Resolver

New returns a Resolver for the repository at root.

func (*Resolver) File

func (r *Resolver) File(ref string) string

File returns why `file:<ref>` does not exist, or "" when it does.

func (*Resolver) Job

func (r *Resolver) Job(ref string) string

Job returns why `job:<ref>` does not exist, or "" when it does.

func (*Resolver) Jobs

func (r *Resolver) Jobs(wf string) map[string]bool

Jobs returns the job ids of one workflow file name, or nil when it cannot be read or has no jobs.

func (*Resolver) Root

func (r *Resolver) Root() string

Root returns the repository root the Resolver reads.

func (*Resolver) Test

func (r *Resolver) Test(ref string) string

Test returns why `test:<ref>` does not exist, or "" when it does.

Jump to

Keyboard shortcuts

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