-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
97 lines (88 loc) · 2.69 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
87
88
89
90
91
92
93
94
95
96
97
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
args: [--allow-multiple-documents]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: git-check
- id: shfmt
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: ruff
name: python ruff lint
files: ^python/
args: [--fix, --exit-non-zero-on-fix, --config, python/pyproject.toml]
- id: ruff-format
name: python ruff format
files: ^python/
args: [--check, --config, python/pyproject.toml]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: python isort
files: ^python/
args: [--settings-path, python/pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.3
hooks:
- id: clang-format
name: C++ Clang-format
files: ^cpp/
- repo: local
hooks:
- 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/
- id: dotnet
name: dotnet format
description: Run dotnet format on files included in the commit.
entry: bash -c 'cd csharp && dotnet csharpier'
pass_filenames: false
types: [file]
language: system
files: ^csharp/
- id: rust-fmt
name: rust format
description: Run cargo fmt on files included in the commit.
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.
entry: bash -c 'cd rust && cargo clippy'
pass_filenames: false
types: [file, rust]
language: system
files: ^rust/
- id: swiftformat
name: swift format
description: Run swiftformat on files included in the commit.
entry: bash -c 'cd swift && swiftformat --lint .'
language: system
files: ^swift/