CLAUDE.md has claimed since the file was written that commitlint gates the commit format in CI and that semantic-release runs off it. There was no commitlint config, no workflow running one, and nothing invoking .releaserc.yml — so the first thing every contributor and every agent reads about this repo was false in two places. scripts/commit-check.sh is the smaller honest answer: the grammar is one regex, and commitlint would mean a Node dependency tree at the root of a Go repo to run it. It is a commit-msg hook locally and a CI step over every commit in a push, and its type list is .releaserc.yml's so the check and the release rules cannot drift. The semantic-release half is recorded as configured-but-not-wired rather than implied to run.
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
# lefthook.yml — local git hooks for yellowjacket
|
|
# Install with: lefthook install
|
|
# Docs: https://github.com/evilmartians/lefthook
|
|
|
|
# Conventional Commits. CI runs the same script over every commit in a
|
|
# push, so skipping this locally only defers the failure.
|
|
commit-msg:
|
|
commands:
|
|
commit-check:
|
|
run: ./scripts/commit-check.sh {1}
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
go-vet:
|
|
glob: "*.go"
|
|
run: go vet -tags webkit2_41 ./...
|
|
|
|
golangci-lint:
|
|
glob: "*.go"
|
|
run: go tool golangci-lint run --timeout 5m --build-tags webkit2_41 ./...
|
|
|
|
codegen-check:
|
|
glob: "*.{go,sql,templ}"
|
|
run: |
|
|
go generate ./...
|
|
if [ -n "$(git diff --name-only)" ]; then
|
|
echo "Generated code is out of date. Run 'make generate' and stage the changes."
|
|
git diff --stat
|
|
exit 1
|
|
fi
|
|
|
|
# frontend/wailsjs is generated by `wails`, not `go generate`, so the
|
|
# check above does not cover it. Takes ~1.5s.
|
|
bindings-check:
|
|
glob: "*.go"
|
|
run: ./scripts/bindings-check.sh
|
|
|
|
# .pi/ documents make targets; a stale one sends an agent off a
|
|
# cliff with total confidence. Instant.
|
|
skill-check:
|
|
glob: "{Makefile,.pi/**/*.md}"
|
|
run: ./scripts/skill-check.sh
|
|
|
|
frontend-typecheck:
|
|
glob: "frontend/**/*.{ts,tsx}"
|
|
root: "frontend/"
|
|
run: ./node_modules/.bin/tsc --noEmit
|
|
|
|
pre-push:
|
|
parallel: true
|
|
commands:
|
|
go-test:
|
|
glob: "*.go"
|
|
run: go test -tags webkit2_41 -race -count=1 -timeout 120s ./...
|
|
|
|
go-mod-verify:
|
|
run: go mod verify
|
|
|
|
# The component and store tier: a real browser, no app. ~2s.
|
|
ui-test:
|
|
glob: "frontend/**/*.ts"
|
|
root: "frontend/"
|
|
run: ./node_modules/.bin/vitest run
|