-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
103 lines (103 loc) · 3.57 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
103 lines (103 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
ci:
skip: ["clang-tidy"] # needs a local Meson build of the C extension, unavailable on pre-commit.ci
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0" # v6.0.0
hooks:
- id: end-of-file-fixer
exclude: ^tools/fuzz/corpus/.*$ # byte-exact crash inputs
- id: trailing-whitespace
exclude: ^tools/fuzz/corpus/.*$ # byte-exact crash inputs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.38.0" # 0.37.2
hooks:
- id: check-github-workflows
args: ["--verbose"]
- repo: https://github.com/codespell-project/codespell
rev: "v2.4.3" # v2.4.2
hooks:
- id: codespell
additional_dependencies: ["tomli>=2.4.1"]
- repo: https://github.com/tox-dev/tox-toml-fmt
rev: "v1.10.0" # v1.9.3
hooks:
- id: tox-toml-fmt
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.29.0" # v2.23.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v23.1.0" # v22.1.5
hooks:
- id: clang-format
files: ^src/turbohtml/.*\.(c|h)$
exclude: ^src/turbohtml/_c/(data/(html_entities|entity_names|tld_table|psl_table|idna_table|normalize_table|encoding_tables|phone_table)|encoding/detect_data)\.h$ # generated tables
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.16.5" # v0.15.16
hooks:
- id: ruff-format
- id: ruff-check
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/pre-commit/sync-pre-commit-deps
rev: "v0.0.5" # v0.0.4
hooks:
- id: sync-pre-commit-deps
- repo: https://github.com/google/yamlfmt
rev: "v0.21.0" # v0.21.0
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: clang-tidy
name: clang-tidy
entry: python tools/run_clang_tidy.py
language: python
files: ^src/turbohtml/.*\.c$
require_serial: true
additional_dependencies:
- clang-tidy==22.1.7
- meson>=1.11.1
- ninja>=1.13
- id: mdformat
name: mdformat
entry: mdformat --wrap 120
language: python
types: [markdown]
additional_dependencies:
- mdformat-gfm>=1
- mdformat-ruff>=0.1.3
- mdformat-frontmatter>=2.1.2 # keep the YAML front matter in issue templates intact
- id: ruff-docs
name: ruff (doc snippets)
entry: python tools/ruff_docs.py
language: python
files: ^docs/.*\.rst$
additional_dependencies:
- ruff==0.15.20 # kept on the ruff-pre-commit rev by sync-pre-commit-deps
- id: changelogs-rst
name: changelog filenames
language: fail
entry: "changelog files must be named ####.(breaking|feature|bugfix|doc|packaging|misc).rst"
exclude: ^docs/changelog/(\d+\.(breaking|feature|bugfix|doc|packaging|misc)\.rst|template\.jinja2)$
files: ^docs/changelog/
- repo: https://github.com/LilSpazJoekp/docstrfmt
rev: "v2.2.1" # v2.1.0
hooks:
- id: docstrfmt
args: ["--line-length=120", "--no-format-python-code-blocks"] # ruff-docs owns the Python snippets
types_or: [rst]
files: ^docs/.*\.rst$
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: "v1.0.2" # v1.0.0
hooks:
- id: sphinx-lint
types: [rst]
files: ^docs/.*\.rst$
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: "v1.30.0" # v1.25.2
hooks:
- id: zizmor
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes