-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
94 lines (89 loc) · 3.11 KB
/
.pre-commit-config.yaml
File metadata and controls
94 lines (89 loc) · 3.11 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
# https://pre-commit.com/
# required by "language: unsupported" hooks
minimum_pre_commit_version: "4.4.0"
# https://pre-commit.ci/#configuration
ci:
autofix_commit_msg: |
chore(pre-commit): auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autoupdate_commit_msg: 'chore(pre-commit): autoupdate'
skip: [check-spelling, check-format-justfile, lint-expl3, lint-python]
# path separator is normalized to "/", so no need to use "[\\/]" in python
# regex, see
# https://github.com/pre-commit/pre-commit/commit/1509dc497e77d742278ae9f6ed19481a24c972f2
exclude: |
(?x)^(
.*\.(md5|tlg)|
tabularray/trial/.*
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
# run "pre-commit autoupdate --freeze" to update the version
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.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.10/docs/usage.md#pre-commit
# If shellcheck is available, this also checks `run:` steps using `bash` shell.
# https://github.com/rhysd/actionlint/blob/main/docs/checks.md#shellcheck-integration-for-run
# The GitHub-hosted ubuntu-latest image has shellcheck pre-installed.
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
- id: actionlint
- repo: local
hooks:
- id: check-format-justfile
alias: justfile
name: Check format for justfiles
language: unsupported
entry: mise run fmt:justfile --check
files: ^justfile$
pass_filenames: false
# 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: mise run lint:typos
pass_filenames: false
- id: lint-expl3
alias: explcheck
name: Lint expl3 files
language: unsupported
entry: mise run lint:expl3
# this file list is composed in scripts/lint-expl3.sh too
files: ^zutil/.*\.(sty|tex)|support/.*\.cfg$
pass_filenames: false
# there exists an official ruff pre-commit
# https://github.com/astral-sh/ruff-pre-commit
- id: lint-python
alias: ruff
name: Lint python files
language: unsupported
entry: mise run lint:python
files: ^l3build-wrapper/
# types_or: [python, pyi, jupyter]
pass_filenames: false
# 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]