-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
86 lines (84 loc) · 2.38 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
exclude: |
(?x)^(
.*\.json|
.*\.err|
tests/.*|
.*CHANGELOG.md|
\.github/.*|
.release-please-manifest.json
)$
- id: trailing-whitespace
exclude: |
(?x)^(
.*\.json|
.*\.err|
tests/.*|
.*CHANGELOG.md|
\.github/.*|
.release-please-manifest.json
)$
- id: fix-byte-order-marker
- id: mixed-line-ending
# Python-specific
- id: check-ast
- id: check-docstring-first
- id: debug-statements
- repo: https://github.com/crate-ci/typos
rev: v1.21.0
hooks:
- id: typos
args: []
- repo: local
hooks:
- id: ruff-format
name: ruff format
description: Format python code with `ruff`.
entry: uv run ruff format guppylang
language: system
files: \.py$
pass_filenames: false
- id: ruff-check
name: ruff
description: Check python code with `ruff`.
entry: uv run ruff check --fix --exit-non-zero-on-fix guppylang
language: system
files: \.py$
pass_filenames: false
- id: mypy-check
name: mypy
description: Check python code with `mypy`.
entry: uv run mypy guppylang
language: system
files: \.py$
pass_filenames: false
- id: cargo-check
name: Cargo check
entry: bash -c 'cd validator && exec cargo check'
pass_filenames: false
types: [file, rust]
language: system
- id: rust-linting
name: Rust linting
entry: bash -c 'cd validator && exec cargo fmt --all --'
pass_filenames: true
types: [file, rust]
language: system
- id: rust-clippy
name: Rust clippy
entry: bash -c 'cd validator && exec cargo clippy --all-targets --all-features -- -Dclippy::all'
pass_filenames: false
types: [file, rust]
language: system