-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
75 lines (69 loc) · 2.94 KB
/
.pre-commit-config.yaml
File metadata and controls
75 lines (69 loc) · 2.94 KB
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
74
75
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# ── C / C++ ────────────────────────────────────────────────────────────
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
hooks:
- id: clang-format
name: clang-format
types_or: [c, c++]
exclude: (/vendored/|/third_party/)
# Uses the project's .clang-format automatically
# ── CMake ──────────────────────────────────────────────────────────────
- repo: https://github.com/cmake-lint/cmake-lint
rev: 1.4.3
hooks:
- id: cmakelint
name: cmake-lint
args: [--filter=-linelength]
# ── Shell ──────────────────────────────────────────────────────────────
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
name: shellcheck
# ── Python (matches ament_lint_common: flake8 + pep257) ─────────────
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
name: flake8
additional_dependencies:
- flake8-blind-except
- flake8-class-newline
- flake8-docstrings
- flake8-import-order
# Config read from .flake8 (matches ament_flake8 defaults)
# ── General ────────────────────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=500]
exclude: pixi\.lock
# ── Copyright / License (matches ament_cmake_copyright) ────────────
- repo: local
hooks:
- id: ament-copyright
name: ament-copyright
entry: ament_copyright
language: system
types_or: [c, c++, python, cmake]
exclude: (/vendored/|/third_party/)
# ── Incremental clang-tidy (pre-push only) ────────────────────────
# Requires: pre-commit install --hook-type pre-push
- repo: local
hooks:
- id: clang-tidy-diff
name: clang-tidy (changed files only)
entry: ./scripts/clang-tidy-diff.sh
language: system
types: [c++]
exclude: (/vendored/|/third_party/)
stages: [pre-push]