GCS_MAVLink: correct resetting of parity after passthhru is done
[ardupilot.git] / .pre-commit-config.yaml
blob94919cc384118389e368722b985c9354da48d58a
1 # See https://pre-commit.com for more information, specially https://pre-commit.com/#pre-commit-run for manual trigger
2 # Some example useful invocations:
3 #  pre-commit run: this is what pre-commit runs by default when committing. This will run all hooks against currently staged files.
4 #  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.
5 #  pre-commit run check-executables-have-shebangs: run the check-executables-have-shebangs hook against all staged files.
7 # Files or directory we want to excude from checking
8 exclude: |
9   (?x)(
10   ^modules/ |
11   ^build/ |
12   ^cmake-build-debug/ |
13   \.m |
14   ^libraries/AP_HAL_ChibiOS/hwdef/scripts/
15   )
17 repos:
18   -   repo: https://github.com/pre-commit/pre-commit-hooks
19       rev: v4.4.0
20       hooks:
21         #-   id: trailing-whitespace
22         #-   id: end-of-file-fixer
23         -   id: mixed-line-ending
24             name: Check line ending character (LF)
25             args: ["--fix=lf"]
26             types_or: [python, c, c++, shell]
27             exclude: |
28               (?x)^(
29                 libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp |
30                 libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.h
31               )$
32         -   id: check-added-large-files
33         -   id: check-executables-have-shebangs
34         -   id: check-shebang-scripts-are-executable
35             exclude: |
36               (?x)^(
37                 .*\/wscript |
38                 wscript
39               )$
40         -   id: check-merge-conflict
41         -   id: check-xml
42         -   id: check-yaml
44   -   repo: https://github.com/psf/black
45       rev: 23.7.0
46       hooks:
47         - id: black
48           files: |
49             (?x)^(
50               libraries\/AP_DDS\/(wscript|.*\.py)$ |
51               Tools/ros2/.*\.py
52             )$
54 # # Use to sort python imports by name and put system import first.
55 #   -   repo: https://github.com/pycqa/isort
56 #       rev: 5.12.0
57 #       hooks:
58 #         - id: isort
59 #           args: [--check-only]
60 #           name: isort (python)
62 # # Use to check python typing to show errors.
63 #   -   repo: https://github.com/pre-commit/mirrors-mypy
64 #       rev: 'v0.950'
65 #       hooks:
66 #         - id: mypy
67 #           args: [--no-strict-optional, --ignore-missing-imports]
68 #           additional_dependencies: [types-PyYAML, types-requests]