Development
Development
Prerequisites
- Go 1.26+
- The sibling
gloo-foo/frameworkandgloo-foo/cmd-*checkouts (wired viareplacedirectives ingo.modduring local development).
Build & run
cd repl
go build -o yupsh ./yupsh
./yupsh
Quality gate
The module pins its tooling in the go.mod tool stanza and gates every change
through make check — it must exit zero:
make check # gofumpt, go vet, staticcheck, gocognit (<=7), govulncheck, 100% coverage
The repl package is held to 100% statement coverage. main is the single
os-wiring seam, excluded from coverage like the framework’s own gate.
Integration tests
Black-box tests build the real yupsh binary and drive it through stdin,
asserting the tool’s user-facing claims — pipelines compose, flags are
translated, globs and ~ expand, files and quoting work, built-ins and errors
behave. They deliberately do not re-test the underlying cmd-* behavior
(that wc counts, that grep matches) — each command owns that.
They are gated behind the integration build tag so they are intentional and
excluded from the hermetic make check:
make integration # or: go test -tags integration ./...
The aim is high confidence that the tool does what it claims, and that future changes don’t silently break a claim — if a claim changes, its test changes too.
Contributing
- Branch from
main. - Make the change; keep the
replpackage at 100% coverage and within the gate. - If you add or change a user-facing capability, add or update its
black-box case in
integration_test.go. - Run
make checkandmake integration— both green. - Open a PR with a clear description.
When reporting an issue, include the version output, your Go version, OS, and
steps to reproduce.