-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
56 lines (51 loc) · 1.58 KB
/
.pre-commit-config.yaml
File metadata and controls
56 lines (51 loc) · 1.58 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: detect-private-key
- id: mixed-line-ending
args: ['--fix=lf']
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-imports
args: [-w, -local, github.com/agentstation/tokenizer]
- id: go-vet
- id: go-mod-tidy
- id: go-unit-tests
args: [-tags=unit]
- id: golangci-lint
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.1
hooks:
- id: gitleaks
- repo: local
hooks:
- id: no-large-files
name: Check for large files
entry: bash -c 'find . -type f -size +1M | grep -v "^./.git" | grep -v "vendor/" | grep -v "dist/" | head -1 | xargs -I {} sh -c "echo \"Large file detected: {}\"; exit 1"'
language: system
pass_filenames: false
- id: go-generate
name: Check go generate
entry: bash -c 'go generate ./... && git diff --exit-code'
language: system
pass_filenames: false
files: '\.go$'