-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy path.pre-commit-config.yaml
45 lines (45 loc) · 1.43 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
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v14.0.0' # The default in Ubuntu 22.04, which is used in our CI
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
exclude: |
(?x)^(
third_party/SuiteSparse/AMD/.*|
third_party/identify_stream_usage/.*
)
- repo: local
hooks:
# The official reuse hook only supports calling lint, so we need our own hook
- id: reuse-annotate
name: reuse-annotate
entry: reuse annotate --license BSD-3-Clause --copyright 'The Ginkgo authors' --year 2017-2023 --style c
language: python
additional_dependencies: [reuse]
types_or: [c, c++, cuda, inc]
exclude: |
(?x)^(
third_party/SuiteSparse/AMD/.*|
third_party/identify_stream_usage/.*|
examples/external-lib-interfacing/external-lib-interfacing.cpp
)$
- id: format-headers
name: format headers
entry: env CLANG_FORMAT=dev_tools/scripts/clang-format.sh dev_tools/scripts/format_header.sh
require_serial: true
language: system
types_or: [c, c++, cuda]
exclude: |
(?x)^(
third_party/SuiteSparse/AMD/.*|
third_party/identify_stream_usage/.*|
include/ginkgo/ginkgo.hpp
)$
- id: update-ginkgo-header
name: update ginkgo header
entry: dev_tools/scripts/update_ginkgo_header.sh
language: script
types: [header]
pass_filenames: false
files: ^include/ginkgo/core