mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
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:
@@ -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.
|
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
|
## Contributing
|
||||||
|
|
||||||
- Branch naming: `feature/`, `fix/`, `refactor/`, `docs/`
|
- Branch naming: `feature/`, `fix/`, `refactor/`, `docs/`
|
||||||
|
|||||||
Reference in New Issue
Block a user