enforcer

command
v0.85.0-pre.13 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Enforcer

Enforcer is the repo command for code-quality enforcement: prerequisites, formatting, linting, safe fixes, typechecks, tests, builds, stress runs, and gates.

The root Makefile is the user-facing command menu. Enforcer is the command it calls when a repo workflow needs the shared task graph for ordering, deduping, and parallel execution.

Public Interface

The command shape is:

go run ./internal/cmd/enforcer <action...> [--lang all|go|ts] [--scope all|fw|matcher|other]

Actions:

  • install
  • fmt
  • lint
  • fix
  • typecheck
  • test
  • build
  • stress
  • gate

Selectors:

  • --lang all|go|ts
  • --scope all|fw|matcher|other

Multiple actions in one invocation share one task context, so dependencies are ordered, duplicate work is deduped, and independent work can run in parallel.

The root Makefile exposes dash-style aliases for common cells and rollups, but those aliases should call this grammar rather than inventing separate workflows.

Do not add public enforcer commands like test-docs, test-kit, typecheck-docs, or adapter-specific framework variants. Those are lower-level tool concerns, not repo enforcement actions.

Partitions

fw is the public Vorma framework surface. It includes the framework fixture in internal/framework_tests and the framework TypeScript packages under internal/pkg/npm/vorma/*.

matcher is the cross-language matcher conformance suite in internal/matcher_tests. It drives the Go implementation and the TypeScript mirror through CLI adapters; its test action builds the TypeScript package first because the TypeScript adapter imports built package exports. The matcher tests are their own package, and their TypeScript files import vorma/kit/matcher through the local package link instead of reaching into implementation source files.

other is the complement where the command supports one. It includes repo Go tests outside the framework fixture, docs checks, and non-framework TypeScript checks under internal/pkg/npm.

The classified root lists live in coherence.go. The shape check should fail when a new Go module, package manifest, or TypeScript project appears without being classified.

Internals

The private task graph is the point of the tool. Public actions should compose shared action/language/scope cells, so one invocation can dedupe repeated setup work and run independent cells in parallel.

Avoid adding granular internal leaves unless they are needed to express the public workflows. Prefer one private DAG over scattered one-off command helpers.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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