-
Notifications
You must be signed in to change notification settings - Fork 166
/
.pre-commit-config.yaml
80 lines (80 loc) · 2.35 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
---
exclude: '^atorch/|^tfplus/'
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: [--line-length=79]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: flake8
exclude: dlrover/proto/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
args: [--ignore-missing-imports, --follow-imports=skip]
exclude: dlrover/proto/
- repo: local
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: bash ./scripts/codestyle/clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
exclude: dlrover/go/brain/vendor
- repo: local
hooks:
- id: cpplint-cpp-source
name: cpplint
description: Check C++ code style using cpplint.py.
entry: bash ./scripts/codestyle/cpplint_precommit.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
exclude: dlrover/go/brain/vendor
- repo: https://github.com/dnephin/pre-commit-golang.git
rev: v0.3.3
hooks:
- id: go-fmt
exclude: dlrover/go/brain/vendor
- id: go-lint
exclude: dlrover/go/brain/vendor
- id: no-go-testing
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.8
hooks:
- id: shellcheck
exclude: dlrover/go/brain/vendor
files: \.(sh)$
- repo: local
hooks:
- id: copyright_checker
name: copyright_checker
entry: python ./scripts/codestyle/copyright.py
language: system
files: \.(go|py|sh)$
exclude: \.(deepcopy.go|pb.go)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.23.0
hooks:
- id: yamllint
exclude:
(dlrover/python/tests/data|operator/config)
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.35.0
# hooks:
# - id: markdownlint
# name: markdownlint
# description: "Checks the style of Markdown files."
# entry: markdownlint --fix --config .markdownlint.yaml
# language: node
# types: [markdown]
# exclude: (dlrover/go/brain/vendor)
# args: [--fix]