-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
82 lines (82 loc) · 2.22 KB
/
.pre-commit-config.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1024"]
exclude: |
(?x)^(
bin/sqlc-gen-go.wasm|
)$
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
args: ["--fix=lf"]
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"]
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: v1.29.4
hooks:
- id: typos
verbose: true
args:
- "--config"
- ".github/typos.toml"
exclude: |
(?x)^(
go.mod
)$
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/golangci/golangci-lint
rev: v1.63.4
hooks:
- id: golangci-lint
- repo: local
hooks:
- id: checks
name: checks
entry: make check
language: golang
pass_filenames: false
types:
- go
- id: kebab-case-files-only
name: kebab-case files only
entry: filenames must be kebab-case only
language: fail
files: '(?!(_test\.go|_grpc\.pb\.go)$)[^a-z0-9.\/\[\]@-]'
exclude: |
(?x)^(
.github/.*|
LICENSE|
Makefile|
README.md|
ops/docker/Dockerfile|
ops/docker/resources/fluentd/Dockerfile
)$
- id: run-tests
name: run tests
description: Run tests using Go's built-in test runner.
entry: make test-ci
types_or: [go, json]
pass_filenames: false
language: system