-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
56 lines (51 loc) · 1.3 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
skip: [cargo-check, cargo-clippy] # failing on pre-commit.ci (wrong rust version?)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: ^tests/fixtures/.*
- id: end-of-file-fixer
exclude: .*\.rs
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
- types-docutils
- sphinx~=7.3
- repo: local
hooks:
- id: cargo-check
name: cargo check
description: Check cargo packages for errors.
entry: cargo check
language: rust
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
description: Lint rust sources
entry: cargo clippy
language: rust
args: ["--fix", "--allow-staged", "--allow-dirty", "--", "-D", "warnings"]
types: [rust]
pass_filenames: false
- id: cargo-fmt
name: cargo fmt
description: Format files with cargo fmt.
entry: cargo fmt
language: rust
types: [rust]
args: ["--"]