docs: add pre-commit checks section to CLAUDE.md

Enforce gofmt and golangci-lint before every commit to catch
formatting and lint issues locally instead of waiting for CI.
This commit is contained in:
Houmgaor
2026-02-27 12:37:48 +01:00
parent d38fef08bb
commit 9f43940a44

View File

@@ -152,6 +152,15 @@ Simple CRUD operations should stay as direct repo calls from handlers — not ev
See `docs/anti-patterns.md` for structural patterns and `docs/technical-debt.md` for specific fixable items with file paths and line numbers.
## Pre-Commit Checks
Before every commit, run `gofmt` and `golangci-lint` on changed Go files (excluding `vendor/`). Do not commit if either check fails.
```bash
gofmt -l . # Must produce no output
golangci-lint run ./... # Must pass with zero errors
```
## Contributing
- Branch naming: `feature/`, `fix/`, `refactor/`, `docs/`