Overview
sxcli-vet catches the sxcli ecosystem's failure modes at compile time,
before any binary runs — the full framework and plain
sxcli.dev/conf tools alike.
The reasoning is short. A framework built on struct tags and reflection moves a class of mistakes from the compiler to startup: a malformed tag, an id that isn't unique, a migration chain that doesn't reach the current schema. The framework's answer is to fail loudly at startup rather than behave strangely later — but "loud at startup" still means you learn about it when you run the thing. A tags-and-reflection model is only defensible with tooling that closes that gap. This is that tooling.
Early days.
vetis the youngest of the four modules and is due a significant redesign. Treat these pages as an orientation to what the tool is for, not as a specification of what it reports today.
Install and run#
$ go install sxcli.dev/vet/cmd/sxcli-vet@latest $ sxcli-vet ./...
On Go 1.24+ the clean setup is per-project pinning, so CI and every contributor run the same version:
$ go get -tool sxcli.dev/vet/cmd/sxcli-vet $ go tool sxcli-vet ./...
It is a standard go/analysis tool, so it also works as a vettool:
$ go vet -vettool=$(which sxcli-vet) ./...
-vettoolreplaces the standard analyzer suite for that invocation — it never extends it. Run the stock checks separately:go vet ./... && sxcli-vet ./.... In practicego testalready runs a subset of the standard ones for you.
What it reports#
Two analyzers — sxreg and sxserved — covering registration chains,
config struct tags, migration chains, compositions, and the front door's
two-phase contract. Both run by default; -sxreg and -sxserved select
one explicitly. See What it checks.
It is not framework-only#
A standalone conf tool gets the checks that apply to it with no
framework in sight: the struct handed to conf.New/conf.NewLoader is
checked against the same tag rules, and sxserved guards the served
return. If you use conf on its own, this tool is still worth having.
Status#
v0, and moving — the tool tracks a framework whose own API is still
settling. Module path sxcli.dev/vet, licensed under Apache-2.0.