Documentation
¶
Overview ¶
Package distributed is the native check that a repository's centrally distributed build files are the distributed ones.
`distribute-build` writes a set of files into every Go repository in the fleet — the linter configuration, the shared Makefile, the dependency and release workflows — and stamps each with a marker line saying so. The marker is the file's own statement that it is not this repository's to edit.
A repository holding one of those files WITHOUT the marker is holding a copy that predates distribution: a hand-written original, or a version from before the file was brought under management. Nothing else in the gate can see that. The file is valid YAML, valid make, and valid on its own terms — it is simply not the one the rest of the fleet is running, so this repository is being built, linted and released by different rules than its siblings, and the difference is invisible at every other level.
Measured across the fleet: every Go repository has all four files, so nothing is MISSING and this check does not look for absence — an analyzer for a rule nobody breaks costs runtime forever and detects nothing. Four repositories carry a stale copy of at least one, which is what this reports.
The list, and why it is a mirror ¶
The paths below mirror what `distribute-build` distributes, which makes this a SECOND source of truth for that set, and a second source of truth drifts. It is written this way because absence cannot be detected from a marker — there is nothing to read in a file that is not there — and the honest fix is a manifest the generator publishes and this check consumes. Until that exists, the list stays deliberately SMALL: only files measured present in every Go repository in the fleet, so a repository is never accused over a file the generator chose not to give it.
Index ¶
Constants ¶
const ( Name = "distributed" Rule = "stickler/" + Name )
Name is the runner's registry name; Rule its rule id.
const ErrRead errs.Const = "cannot read a distributed file"
ErrRead reports a managed file this check could not read.
The file was already established to EXIST, so a failure here is the filesystem changing underneath the run rather than a fact about the repository — and answering "distributed" for a file it could not read would be indistinguishable, at the exit code, from one it read and found current.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct{}
Runner is the native distributed-file check.
func (Runner) Run ¶
Run reports every managed file present without its marker, in a GO repository.
A repository with no go.mod is not one distribute-build writes these files into, and the measurement that chose them says so precisely: each is present in all 93 GO modules. Applying the rule outside that set accuses a repository over a file nobody gave it — which this check shipped doing. On its first fleet run it reported 55 repositories and 51 were non-Go, every one of them holding its own Makefile, and every one of those findings false.