-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
110 lines (110 loc) · 3.29 KB
/
.pre-commit-config.yaml
File metadata and controls
110 lines (110 loc) · 3.29 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
104
105
106
107
108
109
110
exclude: ^(\.copier-answers\.yml)|.pixi$
repos:
- repo: local
hooks:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: pixi-install
entry: pixi install -e default -e lint -e polars-minimal
language: system
always_run: true
require_serial: true
pass_filenames: false
# insert-license
- id: insert-license
name: insert-license
entry: >-
pixi run -e lint
insert-license
--license-base64 Q29weXJpZ2h0IChjKSBRdWFudENvIDIwMjUtMjAyNQpTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQlNELTMtQ2xhdXNl
--dynamic-years
--comment-style "#"
language: system
types: [python]
# docformatter
- id: docformatter
name: docformatter
entry: pixi run -e lint docformatter -i
language: system
types: [python]
# ruff
- 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
# mypy
- id: mypy
name: mypy
entry: pixi run -e default mypy
language: system
types: [python]
require_serial: true
# mypy with oldest supported polars version
- id: mypy
name: mypy-polars-minimal
entry: pixi run -e default-polars-minimal mypy --cache-dir .mypy_cache_polars_minimal
language: system
types: [python]
require_serial: true
# cargo-fmt
- id: cargo-fmt
name: cargo-fmt
entry: cargo fmt
language: system
types: [rust]
require_serial: true
pass_filenames: false
# cargo-clippy
- id: cargo-clippy
name: cargo-clippy
entry: cargo clippy --all-targets
language: system
types: [rust]
require_serial: true
pass_filenames: false
# prettier
- id: prettier
name: prettier
entry: pixi run -e lint prettier --write --list-different --ignore-unknown
language: system
types: [text]
files: \.(md|yml|yaml)$
# taplo
- id: taplo
name: taplo
entry: pixi run -e lint taplo format
language: system
types: [toml]
# pre-commit-hooks
- id: trailing-whitespace-fixer
name: trailing-whitespace-fixer
entry: pixi run -e lint trailing-whitespace-fixer
language: system
types: [text]
- id: end-of-file-fixer
name: end-of-file-fixer
entry: pixi run -e lint end-of-file-fixer
language: system
types: [text]
- id: check-merge-conflict
name: check-merge-conflict
entry: pixi run -e lint check-merge-conflict --assume-in-merge
language: system
types: [text]
exclude: \.rst$
# typos
- id: typos
name: typos
entry: pixi run -e lint typos --force-exclude
language: system
types: [text]
require_serial: true