-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
93 lines (85 loc) · 2.76 KB
/
.pre-commit-config.yaml
File metadata and controls
93 lines (85 loc) · 2.76 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
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
default_stages: [pre-commit]
default_install_hook_types: [pre-commit]
fail_fast: false
repos:
# standard pre-commit hooks for common checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# check for files > 1Mb on commit (ignores git-lfs tracked files)
- id: check-added-large-files
args: ["--enforce-all", "--maxkb", "1024"]
# detect any unresolved merge conflicts remaining in files
- id: check-merge-conflict
# check that executable files have shebangs
- id: check-shebang-scripts-are-executable
# check for broken symlinks that shouldn't be checked in
- id: check-symlinks
# check toml files, pretty much only used for pyproject files
- id: check-toml
# attempt to parse/load yaml files to verify they don't have obvious issues
- id: check-yaml
args: ["--allow-multiple-documents"]
# fix end of file inconsistencies caused by different editors
- id: end-of-file-fixer
# fix trailing whitespace in files of all types
- id: trailing-whitespace
# check (or insert) new license headers on standard file extensions we use
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: (\.cpp|\.cc|\.c|\.hpp|\.h)$
args:
[
--comment-style,
//,
--license-filepath,
.copyright.txt,
--allow-past-years,
--use-current-year,
--no-extra-eol,
]
- id: insert-license
files: (\.sh|\.bash|\.py|CMakeLists\.txt|\.cmake|\.cmake\.in|\.yaml|\.yml|\.toml)$
args:
[
--license-filepath,
.copyright.txt,
--allow-past-years,
--use-current-year,
--no-extra-eol,
]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: [--fix] # apply simple fixes (and report as failure)
- repo: local
hooks:
- id: lint-python-fix
name: run python linter
entry: pixi
args: [run, -e, ci, lint-python-fix]
language: system
types: [python]
pass_filenames: false
- repo: local
hooks:
- id: format-python
name: run python formatter
entry: pixi
args: [run, -e, ci, format-python]
language: system
types: [python]
pass_filenames: false
- repo: local
hooks:
- id: format-cpp
name: run C++ formatter
entry: pixi
args: [run, -e, ci, format-cpp]
language: system
types: [c++]
pass_filenames: false