-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.yml
More file actions
74 lines (60 loc) · 1.59 KB
/
lefthook.yml
File metadata and controls
74 lines (60 loc) · 1.59 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
pre-commit:
parallel: true
commands:
fix-whitespace:
file_types:
- text
exclude: "**/.*"
run: scripts/fix_whitespace.sh {staged_files}
stage_fixed: true
go-format:
glob: "**/*.go"
run: go fmt ./cmd/... ./internal/...
stage_fixed: true
go-imports:
glob: "**/*.go"
run: goimports -w ./cmd ./internal
stage_fixed: true
go-lint:
glob: "**/*.go"
run: golangci-lint run --fix ./cmd/... ./internal/...
stage_fixed: true
go-test:
glob: "**/*.go"
run: task go:test
golangci-config-verify:
glob: ".golangci.yml"
run: golangci-lint config verify
biome-format:
root: "web/"
# Run across the web project every commit to avoid misses
run: bunx biome format --write .
biome-lint:
root: "web/"
# Run across the web project every commit to avoid misses
run: bunx biome check --write .
web-typecheck:
root: "web/"
glob: "**/*.{ts,tsx}"
run: bunx tsc --noEmit
web-knip:
root: "web/"
glob: "**/*.{ts,tsx,js,jsx,json}"
run: bunx knip
mock-oauth-test:
glob: "mock-oauth/**/*.{ts,tsx}"
run: task mock-oauth:test
# Quality checks - zero tolerance
code-duplication:
glob: "**/*.{go,ts,tsx}"
run: task duplication
file-length:
glob: "**/*"
run: scripts/check_file_length.sh {staged_files}
biome-ignores:
root: "web/"
glob: "**/*.{ts,tsx}"
run: task check-ignores
shellcheck:
glob: "{*.sh,**/*.sh}"
run: shellcheck {staged_files}