-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
70 lines (64 loc) · 1.94 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
exclude: ^(.idea|.vscode)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
# https://github.com/pre-commit/pre-commit-hooks
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: ruff
name: python ruff
files: ^python/
args: [--fix, --exit-non-zero-on-fix, --config, python/pyproject.toml]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
name: python black
language_version: python3.11
files: ^python/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: python isort
files: ^python/
- repo: local
hooks:
- id: rust-fmt
name: rust format
description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand.
entry: bash -c 'cd rust && cargo fmt'
pass_filenames: false
types: [file, rust]
language: system
files: ^rust/
- id: rust-clippy
name: rust lint
description: Run cargo clippy on files included in the commit. clippy should be installed before-hand.
entry: bash -c 'cd rust && cargo clippy'
pass_filenames: false
types: [file, rust]
language: system
files: ^rust/
- id: gofmt
name: go format
description: Run gofmt on files included in the commit.
entry: bash -c 'cd go && gofmt -s -w .'
pass_filenames: false
types: [file, go]
language: system
files: ^go/