19 lines
1.4 KiB
Plaintext
19 lines
1.4 KiB
Plaintext
---
|
|
description: Run make lint and make test before finishing any code change
|
|
alwaysApply: true
|
|
---
|
|
|
|
# Verify before done
|
|
|
|
After **any** change to Go code, configs, migrations, OpenAPI, or i18n catalogs in this repo:
|
|
|
|
1. Run `make test` from the repo root — it depends on `make lint` (`golangci-lint`; see `.golangci.yaml`) then `go test ./...` plus logic-package coverage (≥65%).
|
|
|
|
**Do not** tell the user the task is complete, ready to merge, or OK to deploy until `make test` exits 0 **after actually running** lint and tests. If `go` or `golangci-lint` is missing, `make test` must **fail** — install the toolchain and re-run; never treat missing Go as “skipped” verification.
|
|
|
|
If it fails, fix and re-run. Do not skip hooks or substitute partial checks (e.g. only `go test` on one package) unless the user explicitly asked for a scoped check. Use `make lint` alone only when debugging lint without the full test run.
|
|
|
|
Docs-only or comment-only edits with zero build/test surface may skip verification **only when** `make test` can run and you confirmed the change cannot affect compile, lint, or tests — if Go is not installed, you still cannot commit (pre-commit runs `make test`).
|
|
|
|
After substantive changes, update the daily log per `.cursor/skills/daily-change-list/SKILL.md` (`docs/daily/{yyyy}-{mm}-{dd}-change-list.md`) before telling the user the work is complete.
|