Skip to content

Commit 3284204

Browse files
committed
feat: add pre-commit-config
1 parent 3b4a0bb commit 3284204

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.pre-commit-config.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# See https://pre-commit.com for more information
17+
# See https://pre-commit.com/hooks.html for more hooks
18+
19+
default_stages:
20+
- merge-commit
21+
- commit
22+
- post-rewrite
23+
24+
repos:
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v4.3.0
27+
hooks:
28+
- id: check-merge-conflict
29+
- id: trailing-whitespace
30+
- id: end-of-file-fixer
31+
- id: mixed-line-ending
32+
args: ['--fix=lf']
33+
- id: check-executables-have-shebangs
34+
- id: check-shebang-scripts-are-executable
35+
- id: detect-private-key
36+
- id: check-added-large-files
37+
- id: check-case-conflict
38+
- id: destroyed-symlinks
39+
- id: check-yaml
40+
exclude: '.clang-format'
41+
42+
- repo: https://github.com/detailyang/pre-commit-shell
43+
rev: 1.0.5
44+
hooks:
45+
- id: shell-lint
46+
args: ['-x', '--severity=warning']
47+
48+
- repo: https://github.com/pre-commit/mirrors-clang-format
49+
rev: v14.0.6
50+
hooks:
51+
- id: clang-format
52+
53+
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
54+
rev: v0.1.0
55+
hooks:
56+
- id: dockerfilelint
57+
58+
- repo: https://github.com/psf/black
59+
rev: 22.10.0
60+
hooks:
61+
- id: black
62+
63+
- repo: https://github.com/pycqa/flake8
64+
rev: 5.0.4
65+
hooks:
66+
- id: flake8
67+
args:
68+
- "--max-line-length=110"

0 commit comments

Comments
 (0)