This is entirely vibe-coded. We use it and it works for us. YMMV, no guarantees.
Discussed at https://commaok.xyz/ai/vibed-static-analysis/
The remainder of this README is generated by an LLM.
A Go linter that ensures structs are fully initialized. Mark a struct with //exe:completeinit and the linter will report any composite literal that omits a field or uses positional (unkeyed) syntax.
Works across packages using go/analysis facts—if an imported type is marked, callers get checked too.
go install github.com/boldsoftware/exe.dev/completeinit/cmd/completeinit@latest
go vet -vettool=$(which completeinit) ./...//exe:completeinit type Config struct { Host string Port int } _ = Config{Host: "localhost"} // error: missing field Port _ = Config{"localhost", 80} // error: must use keyed fields
For exported types, only exported fields are enforced (unexported fields can't be set from other packages). For unexported types, all fields are enforced.
The //exe:completeinit comment can appear:
- Before the type declaration
- On the
TypeSpecline (in groupedtype (...)blocks) - As an end-of-line comment on the type declaration