-
Notifications
You must be signed in to change notification settings - Fork 222
/
.pre-commit-config.yaml
98 lines (96 loc) · 3 KB
/
.pre-commit-config.yaml
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
exclude: '(.*\.snap|.*render-link.html|head.hbs)'
- id: check-yaml
- id: mixed-line-ending
- id: trailing-whitespace
# rustfmt handles rust files, and in some snapshots we expect trailing spaces.
exclude: '.*\.(rs|snap)$'
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
hooks:
- id: typos
# https://github.com/crate-ci/typos/issues/347
pass_filenames: false
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
additional_dependencies:
- prettier
# TODO: This doesn't seem to work, would be great to fix.
# https://github.com/PRQL/prql/issues/3078
- prettier-plugin-go-template
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.1
hooks:
- id: clang-format
types_or: [c, c++]
- repo: https://github.com/r0x0d/pre-commit-rust
rev: v1.0.1
hooks:
- id: fmt
- repo: https://github.com/r0x0d/pre-commit-rust
rev: v1.0.1
hooks:
- id: clippy
stages: [manual]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: actionlint
- repo: https://github.com/tcort/markdown-link-check
rev: v3.12.2
hooks:
- id: markdown-link-check
name: markdown-link-check-local
types: [markdown]
args: ["--config=.config/.markdown-link-check-local.json"]
# To run across everything (see nightly.yaml for more details)
- id: markdown-link-check
name: markdown-link-check-all
stages: [manual]
types: [markdown]
args: ["--config=.config/.markdown-link-check-all.json"]
- repo: local
hooks:
- id: no-dbg
name: no-dbg
description: We shouldn't merge code with `dbg!` in
language: pygrep
types: ["rust"]
entry: "dbg!"
- repo: local
hooks:
- id: prql-codeblock
name: Prevent prql codeblocks evaluating in book
description:
prql code blocks are evaluated and replaced in the book; instead use
`prql no-eval`
language: pygrep
entry: "```prql$"
files: 'CHANGELOG\.md$'
# This is quite strict, and doesn't fix a large enough share of the issues it
# finds, so we don't include it. But it's reasonable to run every now & again
# manually and take its fixes.
#
# - repo: https://github.com/DavidAnson/markdownlint-cli2
# rev: v0.5.1
# hooks:
# - id: markdownlint-cli2
# args: ["--fix"]
# additional_dependencies:
# - markdown-it-footnote
ci:
# Currently network access isn't supported in the CI product.
skip: [fmt, markdown-link-check]
autoupdate_commit_msg: "chore: pre-commit autoupdate"