-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
61 lines (60 loc) · 1.9 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
# Exclude Regex https://www3.ntu.edu.sg/home/ehchua/programming/howto/Regexe.html#zz-1.8
x-exclude: &exclude
exclude: '^(external|cmake-build-debug|.pytest_cache|docs|.idea|.+pb2.py|soccer_description|soccer_hardware/soccer_firmware|soccerbot/rviz/RoboSoccer.json)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-symlinks
<<: *exclude
- id: end-of-file-fixer
<<: *exclude
- id: trailing-whitespace
<<: *exclude
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
<<: *exclude
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
<<: *exclude
args:
- --line-length=150
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
args:
- --profile
- black
<<: *exclude
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
<<: *exclude
args:
- --max-line-length=150
- --max-complexity=40
- --select=B,C,E,F,W,T4,B9
- --ignore=E203,E266,E501,W503,F403,F401,E402,BLK100,F405,E722,E712,E741,F841,E731
additional_dependencies:
- flake8-black>=0.3.2
language_version: python3
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
<<: *exclude
additional_dependencies:
- pyyaml
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: '' # Use the sha / tag you want to point at
# hooks:
# - id: mypy
# exclude: "cmake-build-debug|setup.py|external|soccer_strategy|soccer_common|soccer_msgs|soccer_localization|soccer_description|soccer_webots|test_integration.py"
# args: ["--config-file","pyproject.toml"]