-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
117 lines (115 loc) · 3.57 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
117 lines (115 loc) · 3.57 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
fail_fast: false
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.11.1
hooks:
- id: check-message
- id: check-branch
- id: check-author-name
- id: check-author-email
- repo: builtin
hooks:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
args: [--allow-multiple-documents]
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
# hooks to use on all my projects
- id: editorconfig-checker # editorconfig-checker config
name: editorconfig-checker
entry: ec
language: system
- id: rumdl # markdown linter
name: rumdl
entry: "rumdl check"
language: system
files: '\.md$'
- id: shellcheck # shell linter
name: "shellcheck"
entry: "shellcheck"
language: system
files: '\.(sh|bash)$'
- id: shfmt # shell formatter
name: "shfmt"
entry: "shfmt"
language: system
files: '\.(sh|bash)$'
- id: tombi-format # toml formatter
name: "tombi format"
entry: "tombi format"
language: system
files: '\.toml$'
- id: tombi-lint # toml linter
name: "tombi lint"
entry: "tombi lint"
language: system
files: '\.toml$'
- id: yamlfmt
name: yamlfmt
entry: "yamlfmt"
language: system
files: '\.(yml|yaml)$'
- id: yamllint
name: yamllint
entry: "yamllint"
language: system
files: '\.(yml|yaml)$'
# github actions and workflows
- id: action-validator
name: action-validator
entry: action-validator
language: system
files: '\.github/workflows/.*\.(yaml|yml)$'
- id: actionlint
name: actionlint
entry: actionlint
language: system
files: '\.github/workflows/.*\.(yaml|yml)$'
# pinact does not handle branch version
# - id: pinact
# name: pinact
# entry: "pinact run -u --min-age 7 --verify-comment" # verify-comment does not handle branch version
# language: system
# files: '\.github/(workflows/.*|actions/.*/action)\.(yaml|yml)$'
# pass_filenames: false
# gh-action pulse is not fast enough to be used in prek
#- id: gh-action-pulse
# name: gh-action-pulse
# entry: "uv run --frozen gh-action-pulse --min-age 7"
# language: system
# files: '\.github/(workflows/.*|actions/.*/action)\.(yaml|yml)$'
# pass_filenames: false
- id: ghalint
name: ghalint
entry: "ghalint run"
language: system
files: '\.github/workflows/.*\.ya?ml$'
- id: ghalintaction
name: ghalintaction
entry: "ghalint run-action"
language: system
files: '(\.github/actions/.*/action\.ya?ml|action\.ya?ml)$'
- id: zizmor
name: zizmor
# limit scope because of bug: https://github.com/zizmorcore/zizmor/issues/2258
entry: "zizmor . --collect workflows,actions,dependabot"
language: system
files: '(\.github/(workflows/.*|actions/.*/action|dependabot\.ya?ml))|(action\.ya?ml)$'
pass_filenames: false
- id: lychee # markdown link checker
name: lychee
entry: lychee
language: system
files: '\.md$'