From 5c5b10f46b2b659ad16d78fbe2260b16e3aa4a3a Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 2 Jun 2026 11:05:48 +0000 Subject: [PATCH] chore: add Taskfile with the check quality gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Defines `task check` (fmt-check + vet + lint + test) — the gate ADR-009 and CI both invoke. Also `task skills` to wire the engineering skills library via the canonical installer (symlinks, gitignored). lint no-ops locally when golangci-lint is absent; CI installs it. --- Taskfile.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Taskfile.yml diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..e592bd7 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,52 @@ +version: "3" + +# Quality gate for Tapir. `task check` is THE gate referenced by ADR-009 and the +# CI workflow. Run it before every push (TBD: commit directly to main). + +tasks: + default: + cmds: + - task: check + + check: + desc: Full quality gate — fmt check, vet, lint, test. + cmds: + - task: fmt-check + - task: vet + - task: lint + - task: test + + fmt: + desc: Format all Go code. + cmds: + - gofmt -w . + + fmt-check: + desc: Fail if any file is not gofmt-clean. + cmds: + - test -z "$(gofmt -l .)" || { echo 'gofmt: files need formatting:'; gofmt -l .; exit 1; } + + vet: + desc: go vet. + cmds: + - go vet ./... + + lint: + desc: golangci-lint (installed by CI; skipped locally if absent). + cmds: + - 'command -v golangci-lint >/dev/null 2>&1 && golangci-lint run ./... || echo "golangci-lint not installed — skipping (CI installs it)"' + + test: + desc: Run all tests, including the acceptance suite (RED until the engine is implemented). + cmds: + - go test ./... + + build: + desc: Compile the binary. + cmds: + - go build -o bin/tapir ./cmd/tapir + + skills: + desc: Wire the engineering skills library into this repo (symlinks, gitignored). + cmds: + - curl -fsSL https://gitea.d-ma.be/mathias/skills/raw/branch/main/install.sh | bash