census

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 2 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 census holds the shape and the bookkeeping every rule-corpus census shares.

Several censuses — formwork-universal-cure-census and formwork-subject-census among them — ask different questions of .formwork/rules/*.yaml and then do the IDENTICAL thing with the answer: report every flagged arm and fail if there is one. Detection is the part that differs and stays in each tool; this is the part that does not.

There is no known-debt list. The helper once read one, a FILE:ARM-ID allowlist that carried a flagged arm as a pass; a flagged arm is now cured or the census fails.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reconcile

func Reconcile(w io.Writer, ruleID string, flags []Finding, why string) int

Reconcile writes the verdict for one census run and returns the problem count: every flagged arm is a problem. why is the one-line explanation appended to each report, so the failing arm carries its reason without the caller re-templating the whole line. A zero return is the only pass.

Types

type Finding

type Finding struct {
	File string
	Line int
	Arm  string
}

Finding is one flagged rule arm: the repo-relative rule file, the 1-based line the verdict anchors to, and the arm's id for the report.

Jump to

Keyboard shortcuts

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