-
Notifications
You must be signed in to change notification settings - Fork 204
/
.pre-commit-config.yaml
83 lines (83 loc) · 2.51 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
exclude: (^.pixi/|.snap)
repos:
- repo: local
hooks:
- id: check-yaml
name: check-yaml
entry: pixi run -e lint check-yaml
language: system
types: [yaml]
- id: end-of-file
name: end-of-file
entry: pixi run -e lint end-of-file-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
- id: trailing-whitespace
name: trailing-whitespace
entry: pixi run -e lint trailing-whitespace-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
# Use ruff for python examples
- id: ruff
name: ruff
entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff-format
entry: pixi run -e lint ruff format --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
# GitHub Actions
- id: actionlint
name: Lint GitHub Actions workflow files
language: system
entry: pixi run -e lint actionlint
types: [yaml]
files: ^\.github/workflows/
# Typecheck python tests
- id: typecheck-python
name: typecheck-python
entry: pixi run typecheck-python
language: system
types_or: [python, pyi]
pass_filenames: false
- id: check-openssl
name: check-openssl
entry: pixi run check-openssl
language: system
types: [file, toml]
pass_filenames: false
# typos
- id: typos
name: typos
entry: pixi run -e lint typos --write-changes --force-exclude
language: system
types: [text]
# TOML format
- id: taplo
name: taplo
entry: pixi run -e lint toml-format
language: system
types: [file, toml]
exclude: "schema/examples/invalid"
- repo: local
hooks:
- id: fmt
name: fmt
language: system
stages: [pre-commit, pre-push, manual]
types: [file, rust]
entry: cargo fmt
pass_filenames: false
- id: clippy
name: clippy
language: system
stages: [pre-push, manual]
types: [file, rust]
entry: cargo clippy --all-targets --workspace -- -D warnings -Dclippy::dbg_macro # Use -D warnings option to ensure the job fails when encountering warnings
pass_filenames: false