|
| 1 | + |
| 2 | +# To use: |
| 3 | +# |
| 4 | +# pre-commit run -a |
| 5 | +# |
| 6 | +# Or: |
| 7 | +# |
| 8 | +# pre-commit install # (runs every time you commit in git) |
| 9 | +# |
| 10 | +# To update this file: |
| 11 | +# |
| 12 | +# pre-commit autoupdate |
| 13 | +# |
| 14 | +# See https://github.com/pre-commit/pre-commit |
| 15 | +exclude: ".pgm$|.svg$" |
| 16 | +repos: |
| 17 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 18 | + rev: v5.0.0 |
| 19 | + hooks: |
| 20 | + - id: check-added-large-files |
| 21 | + - id: check-ast |
| 22 | + - id: check-case-conflict |
| 23 | + - id: check-merge-conflict |
| 24 | + - id: check-symlinks |
| 25 | + - id: check-xml |
| 26 | + - id: check-yaml |
| 27 | + args: ["--allow-multiple-documents"] |
| 28 | + - id: debug-statements |
| 29 | + - id: end-of-file-fixer |
| 30 | + - id: forbid-submodules |
| 31 | + - id: mixed-line-ending |
| 32 | + - id: trailing-whitespace |
| 33 | + exclude_types: [rst] |
| 34 | + - id: fix-byte-order-marker |
| 35 | +- repo: https://github.com/pycqa/isort |
| 36 | + rev: 6.0.1 |
| 37 | + hooks: |
| 38 | + - id: isort |
| 39 | + args: ["tools/pyproject.toml"] |
| 40 | + name: isort (python) |
| 41 | + |
| 42 | +- repo: https://github.com/codespell-project/codespell |
| 43 | + rev: v2.4.1 |
| 44 | + hooks: |
| 45 | + - id: codespell |
| 46 | + additional_dependencies: |
| 47 | + - tomli |
| 48 | + args: |
| 49 | + [--toml=./tools/pyproject.toml] |
| 50 | +- repo: https://github.com/python-jsonschema/check-jsonschema |
| 51 | + rev: 0.31.1 |
| 52 | + hooks: |
| 53 | + - id: check-github-workflows |
| 54 | + args: ["--verbose"] |
| 55 | + - id: check-github-actions |
| 56 | + args: ["--verbose"] |
| 57 | + - id: check-dependabot |
| 58 | + args: ["--verbose"] |
| 59 | +- repo: local |
| 60 | + hooks: |
| 61 | + - id: ament_lint_cmake |
| 62 | + name: ament_lint_cmake |
| 63 | + description: Check CMake code style using cmakelint. |
| 64 | + language: system |
| 65 | + types: [cmake] |
| 66 | + entry: ament_lint_cmake |
| 67 | + - id: ament_cpplint |
| 68 | + name: ament_cpplint |
| 69 | + description: Code style checking using cpplint. |
| 70 | + language: system |
| 71 | + types: [c++] |
| 72 | + entry: ament_cpplint |
| 73 | + - id: ament_uncrustify |
| 74 | + name: ament_uncrustify |
| 75 | + description: Code style checking using uncrustify. |
| 76 | + language: system |
| 77 | + types: [c++] |
| 78 | + args: ["--reformat"] |
| 79 | + entry: ament_uncrustify |
| 80 | + - id: ament_xmllint |
| 81 | + name: ament_xmllint |
| 82 | + description: Check XML markup using xmllint. |
| 83 | + language: system |
| 84 | + types: [xml] |
| 85 | + entry: ament_xmllint |
| 86 | + - id: ament_flake8 |
| 87 | + name: ament_flake8 |
| 88 | + description: Check Python code style using flake8. |
| 89 | + language: system |
| 90 | + types: [python] |
| 91 | + entry: ament_flake8 |
| 92 | + - id: ament_pep257 |
| 93 | + name: ament_pep257 |
| 94 | + description: Check Python code style using pep257. |
| 95 | + language: system |
| 96 | + types: [python] |
| 97 | + entry: ament_pep257 |
0 commit comments