-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (59 loc) · 2.1 KB
/
.pre-commit-config.yaml
File metadata and controls
63 lines (59 loc) · 2.1 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
# https://pre-commit.com/
# https://pre-commit.com/hooks.html
# my use case:
# - muzimuzhi/latex-zutil
# https://github.com/muzimuzhi/latex-zutil/blob/main/.pre-commit-config.yaml
# required by "language: unsupported" hooks
minimum_pre_commit_version: "4.4.0"
# https://pre-commit.ci/#configuration
ci:
skip: [check-spelling]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
# run "pre-commit autoupdate --freeze" to update the version
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# https://github.com/rhysd/actionlint/blob/v1.7.7/docs/usage.md#pre-commit
- repo: https://github.com/rhysd/actionlint
rev: 03d0035246f3e81f36aed592ffb4bebf33a03106 # frozen: v1.7.7
hooks:
- id: actionlint
# https://check-jsonschema.readthedocs.io/en/latest/precommit_usage.html#check-github-actions
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: a1419a25b3ec6c91a963e044f03f6dc197930b10 # frozen: 0.33.1
hooks:
- id: check-github-actions
files: ^[^\.]*/action\.ya?ml$
# args: ['--verbose']
- repo: local
hooks:
# typos bumps version frequently, so use system installation instead of the
# official pre-commit hook
# https://github.com/crate-ci/typos/blob/master/docs/pre-commit.md
# https://github.com/crate-ci/typos/blob/master/.pre-commit-hooks.yaml
- id: check-spelling
alias: typos
name: Check spelling
language: unsupported
# same as the official `typos` hook args
# https://github.com/crate-ci/typos/blob/ebc6aac34e3692b3ce373e13f4145e8980875396/.pre-commit-hooks.yaml
entry: typos --write-changes --force-exclude
# https://pre-commit.com/#meta-hooks
# "pre-commit run --hook-stage manual"
- repo: meta
hooks:
- id: check-hooks-apply
stages: [manual]
- id: check-useless-excludes
stages: [manual]
# "pre-commit run identity --hook-stage manual -a" prints all files not
# excluded
- id: identity
stages: [manual]