-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
128 lines (113 loc) · 3.72 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
default_language_version:
python: python3
default_stages: [commit, push]
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude: '\.csv|\.svg'
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/doublify/pre-commit-clang-format
rev: 62302476d0da01515660132d76902359bed0f782
hooks:
- id: clang-format
name: Check format of C/C++
entry: clang-format -i
# - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
# rev: v4.1.0
# hooks:
# - id: commitlint
# stages: [commit-msg]
# additional_dependencies: ["@commitlint/config-conventional"]
- repo: local
hooks:
- id: buildifier
name: Check format and lint bazel files
entry: buildifier --lint warn --mode fix --warnings all
language: system
files: (WORKSPACE|BUILD|\.bazel|\.bzl)$
- repo: https://github.com/jumanjihouse/pre-commit-hooks/
rev: 3.0.0
hooks:
- id: shfmt
args:
- -i
- "4"
- -ci
exclude: ^\.githooks/
- id: shellcheck
exclude: ^\.yaml/
#- id: markdownlint
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: Sort Python imports
files: (\.py)$
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
name: Fix Python code format
files: (\.py)$
language_version: python3
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: ["black==22.1.0"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: Check PEP8 on Python code
files: (\.py)$
additional_dependencies: [flake8-bugbear==22.12.6]
args: ["--max-line-length=120", "--extend-ignore=E203"]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
name: Check Python code documentation
files: arene/reactor/scenario-manager/(manager|tools)
# exclude the scenario-launcher (deprecated) and the observer (copied from carla) from pydocstyle checks
# also exclude the docs directory (contains autogenerated py files)
exclude: arene/reactor/scenario-manager/manager/legacy|arene/reactor/scenario-manager/tools/observer|arene/reactor/scenario-manager/manager/docs
args: []
- repo: https://github.com/rhysd/actionlint
rev: v1.6.24
hooks:
- id: actionlint
args: ["-ignore", "SC*"]
# For now, we obtain docstrings for only changed files
# For error code information, please refer to: https://pypi.org/project/darglint2/
- repo: https://github.com/akaihola/darglint2
rev: v1.8.2
hooks:
- id: darglint2
name: Check Python docstring style
entry: bash -c 'git diff --name-only --cached --diff-filter=ACMR | grep "\.py$" | xargs darglint2 -m "{path}:{line} -> {msg_id} {msg}"'
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
stages: [commit-msg]
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.36.0
# hooks:
# - id: markdownlint
# args: ['--fix']
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]