-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (60 loc) · 2.09 KB
/
.pre-commit-config.yaml
File metadata and controls
61 lines (60 loc) · 2.09 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
---
exclude: 'examples/15_Step_12\.ipynb'
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
- id: yamllint
types: [yaml]
args: ['-c', './scripts/pre-commit/yamllint.yml']
exclude: 'meta\.yaml$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json # checks that all json files have proper syntax
- id: check-toml # checks that all toml files have proper syntax
- id: end-of-file-fixer # check all files end in a newline
# handled by clang-format
exclude_types: [c, c++, cuda]
- id: pretty-format-json
args: ['--autofix', '--indent=4']
- id: trailing-whitespace # remove trailing whitespace
# don't mess up diff files
exclude: '^src/cmake/patches/.*\.diff$'
# handled by clang-format
exclude_types: [c, c++, cuda]
- id: check-symlinks
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.4
hooks:
- id: ruff-format
- id: ruff
args: ["--config=./pyproject.toml", "--fix"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v16.0.6' # Use the sha / tag you want to point at
hooks:
- id: clang-format
files: \.(cu|cuh|h|cc|inl)$
types_or: []
- repo: local
hooks:
- id: enforce-boilerplate
name: Enforce boilerplate
description: Make sure tests include required boilerplate
entry: python scripts/hooks/enforce_boilerplate.py
language: python
pass_filenames: false
- id: legate-defined
name: legate-defined
description: 'Find uses of ifdef LEGATE_ that should be using LegateDefined()'
entry: ./scripts/hooks/legate_defined.sh
language: script
'types_or': [c++, c, cuda]
require_serial: false
stages: [pre-commit]
exclude: '^src/cupynumeric/cupynumeric_c\.h$'
default_language_version:
python: python3