-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
79 lines (79 loc) · 2.33 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
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.1
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.20
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
args: [--line-length=79]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: flake8
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.701
# hooks:
# - id: mypy
# args: [--ignore-missing-imports, --follow-imports=skip]
- 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: easydl/go/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: easydl/go/vendor
- repo: https://github.com/dnephin/pre-commit-golang.git
rev: v0.3.3
hooks:
- id: go-fmt
exclude: easydl/go/vendor
- id: go-lint
exclude: easydl/go/vendor
- id: no-go-testing
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.8
hooks:
- id: shellcheck
exclude: easydl/go/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: (easydl/go/pkg/proto/easydl.pb.go|easydl/go/vendor)
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.23.0
hooks:
- id: yamllint
exclude:
(elasticdl/python/tests/data|easydl/go/vendor|easydl/go/manifests)
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.23.1
hooks:
- id: markdownlint
name: markdownlint
description: "Checks the style of Markdown files."
entry: markdownlint
language: node
exclude: (easydl/go/vendor)
args: [-s, .markdownlint.yaml]