ci: enforce lint locally via pre-commit hook
CI / Test (linux/amd64) (pull_request) Successful in 29s
CI / Lint (pull_request) Failing after 16s
CI / Build (windows/amd64) (pull_request) Successful in 21s
CI / Build (linux/amd64) (pull_request) Successful in 21s
CI / Build (linux/arm64) (pull_request) Successful in 21s
CI / Test (linux/amd64) (pull_request) Successful in 29s
CI / Lint (pull_request) Failing after 16s
CI / Build (windows/amd64) (pull_request) Successful in 21s
CI / Build (linux/amd64) (pull_request) Successful in 21s
CI / Build (linux/arm64) (pull_request) Successful in 21s
The repo had a .pre-commit-config.yaml entry for golangci-lint already, but pinned to v1.61.0 — which doesn't grok the v2 schema we just migrated to, so it would crash if anyone ever ran it. Hence nobody did. Replace the third-party hook blocks with local hooks that call whatever tool is on the developer's PATH (gofumpt + go vet + golangci-lint). That way the version of each tool tracks what the developer would invoke by hand — no drift between hook config and binary. Add 'make setup' as a one-liner per-clone bootstrap: * installs gofumpt + golangci-lint via go install if missing * installs the pre-commit hooks via 'pre-commit install' end-of-file-fixer auto-fixed two existing files (web/static/css/ styles.css and ask.md) — trailing newlines, harmless.
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user