-
Notifications
You must be signed in to change notification settings - Fork 340
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (64 loc) · 2.02 KB
/
.pre-commit-config.yaml
File metadata and controls
69 lines (64 loc) · 2.02 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
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
files: \.(c|cc|cxx|cpp|h|hpp|hxx|cu|cuh)$
args:
- --style=file
- --fallback-style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
files: \.(yaml|yml)$
- id: end-of-file-fixer
files: \.(py|md|yaml|yml|c|cc|cxx|cpp|h|hpp|hxx|cu|cuh|ipynb)$
- id: trailing-whitespace
files: \.(py|md|yaml|yml|c|cc|cxx|cpp|h|hpp|hxx|cu|cuh|ipynb)$
- id: check-added-large-files
name: Check for large files
args: ['--maxkb=1000']
exclude: uv.lock
- id: check-json
name: Check JSON files
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
args:
- --wrap=88
additional_dependencies:
- mdformat-gfm
- mdformat-tables
- mdformat-frontmatter
exclude: ^(docs/algorithms/.*\.md|docs/best_practices/algo_perf.md)$
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.9
hooks:
- id: ruff # Run the linter.
name: Run Linter Check (Ruff)
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
- id: ruff-format # Run the formatter.
name: Run Formatter (Ruff)
types_or: [ python, pyi, jupyter ]
# Clean notebook outputs and metadata
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
name: nbstripout - Strip notebook output
description: Strip output from Jupyter notebooks
# Generate CLI documentation
- repo: local
hooks:
- id: generate-cli-docs
name: Generate CLI documentation
entry: python docs/generate_cli_docs.py
language: system
files: ^(areal/api/cli_args\.py|docs/generate_cli_docs\.py)$
pass_filenames: false
always_run: false
require_serial: true