-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
75 lines (72 loc) · 2.08 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
# Work around for some misconfigured virtualenv
# https://github.com/pre-commit/pre-commit/issues/1375
default_language_version:
python: python3
fail_fast: false
ci:
skip: [cargo-fmt, cargo-deny, cargo-check, cargo-clippy]
repos:
# Misc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.19
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
hooks:
- id: check-github-workflows
- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.11.35
hooks:
- id: typos
# Rust
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --
language: system
types: [rust]
pass_filenames: false # This makes it a lot faster
- id: cargo-deny # cargo install --locked cargo-deny
name: cargo deny
entry: cargo deny --all-features check --
language: system
pass_filenames: false
stages: [manual] # because it's slow
- id: cargo-check
name: cargo check
entry: cargo check --all-features --all-targets --
language: system
pass_filenames: false
types: [rust]
stages: [manual] # because it's slow
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --
language: system
pass_filenames: false
types: [rust]
stages: [manual] # because it's slow
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff-format
args: ["--config", "moyopy/pyproject.toml"]
- id: ruff
args: [ "--fix", "--show-fixes", "--config", "moyopy/pyproject.toml"]
types_or: [python, pyi]