-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
60 lines (53 loc) · 1.45 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
# Based on https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/.pre-commit-config.yaml
# Lint cpp, py, xml, cmake
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v1.25.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: local
hooks:
- id: ament_clang_format
name: ament_clang_format
stages: [commit]
entry: ament_clang_format
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ["--reformat"]
- repo: local
hooks:
- id: ament_flake8
name: ament_flake8
stages: [commit]
entry: ament_flake8
language: system
files: \.py$
- repo: local
hooks:
- id: ament_xmllint
name: ament_xmllint
stages: [commit]
entry: ament_xmllint
language: system
files: \.xml$
- repo: local
hooks:
- id: ament_lint_cmake
name: ament_lint_cmake
stages: [commit]
entry: ament_lint_cmake
language: system
files: CMakeLists.txt$
# Spellcheck in comments and docs
# skipping of *.svg files is not working...
- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
hooks:
- id: codespell
args: ['--write-changes -q4 -L dout,DOUT']
exclude: \.(svg|pyc|drawio|txt)$