-
Notifications
You must be signed in to change notification settings - Fork 206
/
.pre-commit-config.yaml
89 lines (89 loc) · 2.75 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
exclude: (^.pixi/|.snap)
repos:
- repo: local
hooks:
- id: check-yaml
name: Check YAML
entry: pixi run --environment=lint check-yaml
language: system
types: [yaml]
stages: [pre-commit, manual]
- id: end-of-file
name: Check end-of-file
entry: pixi run --environment=lint end-of-file-fixer
language: system
types: [text]
stages: [pre-commit, manual]
- id: trailing-whitespace
name: Fix trailing whitespace
entry: pixi run --environment=lint trailing-whitespace-fixer
language: system
types: [text]
stages: [pre-commit, manual]
# Use ruff for python examples
- id: ruff
name: Ruff lint
entry: pixi run --environment=lint ruff-lint
language: system
types_or: [python, pyi]
require_serial: true
stages: [pre-commit, manual]
- id: ruff-format
name: Ruff format
entry: pixi run --environment=lint ruff-format
language: system
types_or: [python, pyi]
require_serial: true
stages: [pre-commit, manual]
# GitHub Actions
- id: actionlint
name: Lint GitHub Actions workflow files
language: system
entry: pixi run --environment=lint actionlint
types: [yaml]
files: ^\.github/workflows/
stages: [pre-commit, manual]
# Typecheck python tests
- id: typecheck-python
name: Typecheck Python
entry: pixi run --environment=lint typecheck-python
language: system
types_or: [python, pyi]
pass_filenames: false
stages: [pre-commit, manual]
- id: check-openssl
name: Check openssl
entry: pixi run --environment=lint check-openssl
language: system
types: [file, toml]
pass_filenames: false
stages: [pre-commit, manual]
# typos
- id: typos
name: Typos
entry: pixi run --environment=lint typos
language: system
types: [text]
stages: [pre-commit, manual]
# TOML format
- id: toml-format
name: TOML format
entry: pixi run --environment=lint toml-format
language: system
types: [file, toml]
exclude: "schema/examples/invalid"
stages: [pre-commit, manual]
- id: cargo-fmt
name: Cargo format
language: system
types: [file, rust]
entry: pixi run --environment=lint cargo-fmt
pass_filenames: false
stages: [pre-commit, manual]
- id: cargo-clippy
name: Cargo clippy
language: system
types: [file, rust]
entry: pixi run --environment=lint cargo-clippy
pass_filenames: false
stages: [pre-commit, manual]