-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
41 lines (41 loc) · 1.63 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
41 lines (41 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# See https://pre-commit.com for installation and usage.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
files: ^(README\.md|CONTRIBUTING\.md|AGENTS\.md|CLAUDE\.md|llms\.txt|docs/release-notes-v0\.1\.0\.md|\.pre-commit-config\.yaml)$
- id: end-of-file-fixer
files: ^(README\.md|CONTRIBUTING\.md|AGENTS\.md|CLAUDE\.md|llms\.txt|docs/release-notes-v0\.1\.0\.md|\.pre-commit-config\.yaml)$
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
files: ^(README\.md|CONTRIBUTING\.md|AGENTS\.md|CLAUDE\.md|llms\.txt|docs/release-notes-v0\.1\.0\.md|\.pre-commit-config\.yaml)$
- repo: local
hooks:
- id: gofmt
name: gofmt
entry: gofmt -w
language: system
files: ^(cmd/readsync-service/|cmd/readsyncctl/|cmd/readsync-tray/|internal/(resolver|conflicts|logging)/).*\.go$
- id: go-mod-tidy
name: go mod tidy
entry: go mod tidy
language: system
pass_filenames: false
files: ^(go\.mod|go\.sum|.*\.go)$
- id: go-vet
name: go vet all packages
entry: go vet ./...
language: system
pass_filenames: false
files: ^(cmd|internal|tests|go\.mod|go\.sum)/?
- id: go-test-unit
name: go test unit packages
entry: go test -count=1 -timeout 30s ./internal/resolver/... ./internal/conflicts/... ./internal/logging/...
language: system
pass_filenames: false
files: ^(cmd|internal|tests|go\.mod|go\.sum)/?