Skip to content

Commit a5b991e

Browse files
committed
ci(pre-commit): Update pre-commit hooks and add useful new ones
1 parent d269553 commit a5b991e

File tree

2 files changed

+57
-25
lines changed

2 files changed

+57
-25
lines changed

.pre-commit-config.yaml

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,54 @@
1+
---
12
default_language_version:
2-
python: python3
3+
python: python3
34
repos:
4-
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
6-
hooks:
7-
- id: fix-byte-order-marker
8-
- id: check-case-conflict
9-
- id: check-json
10-
- id: check-merge-conflict
11-
- id: check-xml
12-
- id: check-yaml
13-
- id: end-of-file-fixer
14-
- id: mixed-line-ending
15-
- id: trailing-whitespace
16-
- repo: https://github.com/codespell-project/codespell
17-
rev: v2.3.0
18-
hooks:
19-
- id: codespell
20-
args: [ --ignore-words=.codespellignore ]
21-
- repo: https://github.com/doublify/pre-commit-rust
22-
rev: v1.0
23-
hooks:
24-
- id: fmt
25-
- id: cargo-check
26-
- id: clippy
27-
args: [--all-targets, --all-features, --, -D, warnings]
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
7+
hooks:
8+
- id: check-case-conflict
9+
- id: check-json
10+
- id: check-merge-conflict
11+
- id: check-symlinks
12+
- id: check-toml
13+
- id: check-xml
14+
- id: check-yaml
15+
- id: destroyed-symlinks
16+
- id: detect-private-key
17+
- id: end-of-file-fixer
18+
- id: fix-byte-order-marker
19+
- id: forbid-new-submodules
20+
- id: mixed-line-ending
21+
- id: trailing-whitespace
22+
exclude: .tsv$
23+
- repo: https://github.com/codespell-project/codespell
24+
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
25+
hooks:
26+
- id: codespell
27+
args: [--ignore-words=.codespellignore]
28+
exclude_types: [tsv, json]
29+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
30+
rev: 8d1b9cadaf854cb25bb0b0f5870e1cc66a083d6b # frozen: 0.2.3
31+
hooks:
32+
- id: yamlfmt
33+
- repo: https://github.com/gitleaks/gitleaks
34+
rev: 39fdb480a06768cc41a84ef86959c07ff33091c4 # frozen: v8.28.0
35+
hooks:
36+
- id: gitleaks
37+
- repo: https://github.com/woodruffw/zizmor-pre-commit
38+
rev: 122d24ec728f140b38330ae8b04e3c5fe8b774c5 # frozen: v1.15.2
39+
hooks:
40+
- id: zizmor
41+
- repo: https://github.com/doublify/pre-commit-rust
42+
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # frozen: v1.0
43+
hooks:
44+
- id: fmt
45+
args: [--all, --]
46+
- id: clippy
47+
args: [--locked, --workspace, --all-features, --all-targets, --, -D, warnings]
48+
- repo: https://github.com/Holzhaus/sourceheaders
49+
rev: 37fab20a62cc63ebb9a8855a2ab90ec7dc56cadf # frozen: v0.0.4
50+
hooks:
51+
- id: sourceheaders
52+
53+
ci:
54+
skip: [fmt, clippy]

.sourceheaders.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[general]
2+
license = "MPL-2.0"
3+
copyright_holder = "Jan Holthuis <jan.holthuis@rub.de>"
4+
prefer_inline = true
5+
width = 99

0 commit comments

Comments
 (0)