-
Notifications
You must be signed in to change notification settings - Fork 702
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
executable file
·61 lines (53 loc) · 1.62 KB
/
.pre-commit-config.yaml
File metadata and controls
executable file
·61 lines (53 loc) · 1.62 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
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.
default_language_version:
python: python3
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: quarterly
submodules: false
skip: []
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: end-of-file-fixer
files: .*.(c|cc|cxx|cpp|cu|cuh|h|hpp|py)$
- id: trailing-whitespace
files: .*.(c|cc|cxx|cpp|cu|cuh|h|hpp|py)$
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
name: Format python code
args: [--line-length=100, --preview, --enable-unstable-feature=string_processing]
types: [python]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
hooks:
- id: ruff
name: Lint python code
types: [python]
files: ^transformer_engine/
- repo: https://github.com/cpplint/cpplint
rev: '1.6.0'
hooks:
- id: cpplint
types_or: [c, c++, cuda]
files: ^transformer_engine/(common|jax|pytorch)/
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.6
hooks:
- id: clang-format
entry: clang-format -i
args: ["-style=file"]
files: ^transformer_engine.*\.(c|cc|cxx|cpp|cu|cuh|h|hpp)$
- repo: https://github.com/netromdk/vermin
rev: b70ff9611a01a2bf2f702aa537d14e71e330edba
hooks:
- id: vermin
args: ['-t=3.10-', '--violations']