-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
68 lines (58 loc) · 1.41 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
default_stages: [commit]
repos:
- repo: local
hooks:
- id: rustfmt
name: rustfmt
entry: rustfmt
language: system
types: [rust]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
stages: [commit]
- repo: https://github.com/ambv/black
rev: 22.12.0
hooks:
- id: black
language_version: python3
stages: [commit]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.5.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
# Temporarily disable this hook due to toml-sort issue
# TODO: renable this hook once this issue is fixed
# https://github.com/macisamuele/language-formatters-pre-commit-hooks/issues/133
# - id: pretty-format-toml
# args: [--autofix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: mixed-line-ending
args: [--fix=lf]
stages: [commit]
- repo: local
hooks:
- id: rustclippy
name: rustclippy
entry: cargo clippy --all-targets --all-features -- -Dclippy::all
pass_filenames: false
language: system
types: [rust]