-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
72 lines (72 loc) · 1.78 KB
/
lefthook.yml
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
---
output: false
pre-commit:
commands:
toml:
glob: '*.toml'
run: taplo fmt {staged_files}
stage_fixed: true
json:
glob: '*.json'
run: fixjson -w {staged_files}
stage_fixed: true
yaml:
glob: '*.{yaml,yml}'
run: yamlfix {staged_files}
stage_fixed: true
nix:
glob: '*.nix'
run: nixfmt {staged_files}
stage_fixed: true
deadnix:
glob: '*.nix'
run: deadnix -eq {staged_files}
stage_fixed: true
python:
glob: '*.py'
run: ruff check --fix {staged_files} && ruff format {staged_files}
stage_fixed: true
lua:
glob: '*.lua'
run: stylua {staged_files}
stage_fixed: true
fennel:
glob: '*.fnl'
run: fnlfmt --fix {staged_files}
stage_fixed: true
markdown:
glob: '*.md'
run: prettier --parser markdown --write {staged_files} && autocorrect --fix
--quiet {staged_files}
stage_fixed: true
sh:
glob: '*.sh'
run: shfmt -s -w {staged_files}
stage_fixed: true
go:
glob: '*.go'
run: gofmt -w {staged_files}
stage_fixed: true
elisp:
glob: '*.el'
run: lisp-format -i -style=google {staged_files}
stage_fixed: true
keep-sorted:
glob: '*.nix'
run: keep-sorted --mode fix {staged_files}
stage_fixed: true
whitespace:
run: >
whitespace-format --remove-trailing-whitespace
--remove-trailing-empty-lines
{staged_files} --exclude
"(.gpg|.png|.jpg|.jpeg|.webp|.gif|.dat|.age|.mp3|.mp4|.mkv|.ttf|.ico|.xcf|.ogg)$"
stage_fixed: true
config-file-validator:
run: validator {staged_files}
gitleaks:
run: gitleaks protect -v --staged
commit-msg:
scripts:
commitlint.sh:
runner: bash