Skip to content

Commit 343254d

Browse files
committed
Add pre-commit configuration file
Related to space-ros#192 Add precommit configs for - file testing - docker linting - shell linting and formatting - python linting and formatting - cpp linting and formatting
1 parent f885e27 commit 343254d

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.pre-commit-config.yaml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# .pre-commit-config.yaml
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.6.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: check-xml
10+
- id: check-added-large-files
11+
- id: check-merge-conflict
12+
13+
- repo: https://github.com/hadolint/hadolint
14+
rev: v2.13.0-beta
15+
hooks:
16+
- id: hadolint
17+
name: Lint Dockerfiles
18+
args: [--ignore, DL3008, --ignore, DL3013]
19+
20+
- repo: https://github.com/pre-commit/pre-commit-hooks
21+
rev: v4.6.0
22+
hooks:
23+
- id: trailing-whitespace
24+
- id: end-of-file-fixer
25+
- id: check-yaml
26+
- id: check-added-large-files
27+
28+
- repo: https://github.com/psf/black
29+
rev: 24.8.0
30+
hooks:
31+
- id: black
32+
language_version: python3.10
33+
34+
- repo: https://github.com/pycqa/isort
35+
rev: 5.13.2
36+
hooks:
37+
- id: isort
38+
args: ["--profile", "black"]
39+
40+
- repo: https://github.com/pre-commit/mirrors-mypy
41+
rev: v1.11.2
42+
hooks:
43+
- id: mypy
44+
45+
- repo: https://github.com/pocc/pre-commit-hooks
46+
rev: v1.3.5
47+
hooks:
48+
- id: clang-tidy
49+
args: [--checks=*]
50+
- id: cppcheck
51+
args: [--enable=all]
52+
- id: clang-format
53+
args: [--style=Google]
54+
55+
56+
- repo: https://github.com/shellcheck-py/shellcheck-py
57+
rev: v0.10.0.1
58+
hooks:
59+
- id: shellcheck
60+
args: ["-x"]
61+
62+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
63+
rev: 3.0.0
64+
hooks:
65+
- id: shfmt
66+
args: ["-i", "2", "-ci", "-bn", "-sr"]

0 commit comments

Comments
 (0)