forked from nvidia-holoscan/holohub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
99 lines (90 loc) · 2.98 KB
/
.pre-commit-config.yaml
File metadata and controls
99 lines (90 loc) · 2.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Run `pre-commit autoupdate` to refresh to latest compatible versions.
repos:
# General: pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-yaml
exclude: 'doc/website/mkdocs\.yml|applications/video_streaming/video_streaming_server/cpp/video_streaming_server_demo\.yaml'
- id: end-of-file-fixer
- id: mixed-line-ending
# Python: ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.6
hooks:
- id: ruff
args: [--fix, --ignore, E712]
# Python: isort
- repo: https://github.com/PyCQA/isort
rev: 8.0.1
hooks:
- id: isort
args: [--settings-path, .]
# Python: black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black
# Mirror pyproject.toml [tool.black] extend-exclude
exclude: |
(?x)(
^\.cache/
| ^build[^/]*/
| ^install[^/]*/
| cmake/pybind11/
| ^\.local/
| \.ipynb$
)
# Spelling: codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
args:
- --write-changes
- --ignore-words=codespell_ignore_words.txt
- --exclude-file=codespell.txt
- --skip=*.onnx,*.min.js,*.min.js.map,*/Contrastive_learning_Notebook.ipynb,./data/
# C++: cpplint
- repo: https://github.com/cpplint/cpplint
rev: 2.0.2
hooks:
- id: cpplint
args: [--quiet]
exclude: ^applications/holoviz/template/cookiecutter
# Markdown: markdownlint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
args: [--fix, --config, .markdownlint.yaml, --ignore-path, .markdownlintignore]
# Copyright header check (NVIDIA SPDX)
- repo: local
hooks:
- id: check-copyright
name: check-copyright
entry: python3 .github/workflows/scripts/check_copyright.py
args:
- .
- --git-modified-only
- --exclude-config
- .github/workflows/scripts/copyright_excludes.txt
- --update-current-year
language: system
pass_filenames: false