chore: add pre-commit hook configuration

Local hooks for hygiene (whitespace, YAML, merge conflicts, large files),
Go toolchain (fmt, vet, mod tidy, build), and golangci-lint matching CI.
This commit is contained in:
2026-02-23 05:22:30 +01:00
parent d23ddba1ca
commit cd92e84696

View File

@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^deploy/helm/templates/
- id: check-merge-conflict
- id: check-added-large-files
- repo: https://github.com/golangci/golangci-lint
rev: v2.1.6
hooks:
- id: golangci-lint
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt-repo
- id: go-vet-repo-mod
- id: go-mod-tidy
- id: go-build-mod