-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (64 loc) · 2.06 KB
/
.pre-commit-config.yaml
File metadata and controls
64 lines (64 loc) · 2.06 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1 # Use the sha / tag you want to point at
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests]
files: ^(tests|examples)/.*\.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.5
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
files: ^(tests|examples)/.*\.py$
# Run the formatter.
- id: ruff-format
files: ^(tests|examples)/.*\.py$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
files: ^(tests|examples)/.*\.py$
- id: end-of-file-fixer
files: ^(tests|examples)/.*\.py$
- id: check-yaml
files: ^(tests|examples)/.*\.py$
- id: check-added-large-files
files: ^(tests|examples)/.*\.py$
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: example.secrets
files: ^(tests|examples)/.*\.py$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.0 # Use the appropriate version
hooks:
- id: clang-format
files: ^src/.*\.(cpp|hpp)$
- repo: local
hooks:
# The official reuse hook only supports calling lint, so we need our own hook
# I do not put jupyter here because it adds another license file for jupyter notebook
- id: reuse-annotate
name: reuse-annotate
entry: reuse annotate --license MIT --copyright 'pyGinkgo authors' --merge-copyright
language: python
additional_dependencies: [reuse==2.1.0]
types_or: [c, c++, inc, python]
# .cmake-format.py is from OGL
exclude: |
(?x)^(
.cmake-format.py
)$