1b90e60aeb
The go-unit-tests hook caps every package at 30s and re-runs the whole module once per file batch, so the git-fixture tests in cmd/agentws timed out as soon as they grew. - Replace go-unit-tests with a module-level `go test ./...` local hook
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-merge-conflict
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
- repo: https://github.com/dnephin/pre-commit-golang
|
|
rev: v0.5.1
|
|
hooks:
|
|
- id: go-fmt
|
|
|
|
# go vet and go test at the module level (dnephin's run at repo root, which has
|
|
# no .go files here since both tools live under cmd/, and its go-unit-tests
|
|
# caps every package at 30s and re-runs the whole module once per file batch —
|
|
# the git-fixture tests outgrew both). The CI pre-commit image
|
|
# (almalinux9-gobuilder) has go installed.
|
|
- repo: local
|
|
hooks:
|
|
- id: go-vet-mod
|
|
name: go vet (module)
|
|
entry: go vet ./...
|
|
language: system
|
|
types: [go]
|
|
pass_filenames: false
|
|
- id: go-test-mod
|
|
name: go test (module)
|
|
entry: go test ./...
|
|
language: system
|
|
types: [go]
|
|
pass_filenames: false
|