-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.pre-commit-config.yaml
56 lines (50 loc) · 1.58 KB
/
.pre-commit-config.yaml
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
repos:
# Make sure that Jupyter notebooks under version control
# have their outputs stripped before committing
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: ".ipynb"
# Run Black - the uncompromising Python code formatter
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black-jupyter
# Format C++ code with Clang-Format - automatically applying the changes
- repo: https://github.com/ssciwr/clang-format-precommit
rev: v16.0.2
hooks:
- id: clang-format
args:
- -i
- --style=Mozilla
exclude: ^ext/
# Add some general purpose useful hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Make sure that contained YAML files are well-formed
- id: check-yaml
# Trim trailing whitespace of all sorts
- id: trailing-whitespace
# Sort lines in requirements files
- id: requirements-txt-fixer
# Apply a file size limit of 500kB
- id: check-added-large-files
# Simple parser validation of e.g. pyproject.toml
- id: check-toml
# Unify file endings
- id: end-of-file-fixer
# CMake Formatting/Linting Utility
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- id: cmake-lint
# Check Configuration as Code files for integrations
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows
- id: check-readthedocs