forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
73 lines (68 loc) · 2.49 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
# See https://pre-commit.com for more information, specially https://pre-commit.com/#pre-commit-run for manual trigger
# Some example useful invocations:
# pre-commit run: this is what pre-commit runs by default when committing. This will run all hooks against currently staged files.
# pre-commit run --all-files: run all the hooks against all the files. This is a useful invocation if you are using pre-commit in CI.
# pre-commit run check-executables-have-shebangs: run the check-executables-have-shebangs hook against all staged files.
# Files or directory we want to excude from checking
exclude: |
(?x)(
^modules/ |
^build/ |
^cmake-build-debug/ |
\.m |
^libraries/AP_HAL_ChibiOS/hwdef/scripts/
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
#- id: trailing-whitespace
#- id: end-of-file-fixer
- id: mixed-line-ending
name: Check line ending character (LF)
args: ["--fix=lf"]
types_or: [python, c, c++, shell]
exclude: |
(?x)^(
libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp |
libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.h
)$
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
exclude: |
(?x)^(
.*\/wscript |
wscript
)$
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- repo: https://github.com/lsst-ts/pre-commit-xmllint
rev: 6f36260b537bf9a42b6ea5262c915ae50786296e
hooks:
- id: format-xmllint
files: libraries/AP_DDS/dds_xrce_profile.xml
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
files: |
(?x)^(
libraries\/AP_DDS\/(wscript|.*\.py)$ |
Tools/ros2/.*\.py
)$
# # Use to sort python imports by name and put system import first.
# - repo: https://github.com/pycqa/isort
# rev: 5.12.0
# hooks:
# - id: isort
# args: [--check-only]
# name: isort (python)
# # Use to check python typing to show errors.
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v0.950'
# hooks:
# - id: mypy
# args: [--no-strict-optional, --ignore-missing-imports]
# additional_dependencies: [types-PyYAML, types-requests]