-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
81 lines (81 loc) · 2.25 KB
/
.pre-commit-config.yaml
File metadata and controls
81 lines (81 loc) · 2.25 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
76
77
78
79
80
81
---
# See https://pre-commit.com for more information on these settings
repos:
# Generally useful checks provided by pre-commit
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: end-of-file-fixer
- id: forbid-submodules
- id: mixed-line-ending
- id: trailing-whitespace
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.5
hooks:
- id: ruff-format
- id: ruff
args: [--fix]
# C++ formatting
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
args: ["--style=file:.config/clang-format"]
# C++ linting
- repo: https://github.com/cpplint/cpplint
rev: 2.0.0
hooks:
- id: cpplint
args: ["--config=.cpplint.cfg", --quiet, --output=sed]
# Markdown
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.28
hooks:
- id: pymarkdown
args: [-d, MD013, fix]
# XML
- repo: https://github.com/emersonknapp/ament_xmllint
rev: v0.1
hooks:
- id: ament_xmllint
# YAML
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
args: [-d, "{extends: default, rules: {line-length: {max: 256}, commas: false}}"]
# CMake
- repo: https://github.com/cmake-lint/cmake-lint
rev: 1.4.3
hooks:
- id: cmakelint
args: [--linelength=140]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
types_or: [python, cmake, shell]
name: Copyright headers for Python/CMake
args: [
--license-filepath, .config/copyright.txt,
--comment-style, '#',
--allow-past-years,
--no-extra-eol,
]
- id: insert-license
types_or: [c++, c]
name: Copyright headers for C/C++
args: [
--license-filepath, .config/copyright.txt,
--comment-style, '//',
--allow-past-years,
]