-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
122 lines (108 loc) · 2.98 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Copyright (c) 2024, NVIDIA CORPORATION.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
#FIXME
#- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix=lf']
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# FIXME
# Mypy: static type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.13.0"
hooks:
- id: mypy
args: ["--config-file", "pyproject.toml"]
files: ^nvmath(.*)\.py$
additional_dependencies:
- cuda-python
- cupy-cuda12x
- mpi4py-mpich
- numba
- numpy
- pytest
- scipy
- torch
- types-cffi
- types-pywin32
# FIXME: Prettier pre-commit plugin is no longer supported
# Autoformat: YAML, JSON, Markdown, etc.
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v4.0.0-alpha.8
# hooks:
# - id: prettier
# Spellcheck
- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell
additional_dependencies:
- tomli
# FIXME: Types is very agressive and would require setting lots of ignore patterns
# Typos
# - repo: https://github.com/crate-ci/typos
# rev: v1.24.5
# hooks:
# - id: typos
# Security: secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
# FIXME
# Security: secrets
- repo: https://github.com/thoughtworks/talisman
rev: "v1.32.0"
hooks:
- id: talisman-commit
entry: cmd --githook pre-commit
# FIXME
# Bash linter
# - repo: https://github.com/openstack/bashate
# rev: 2.1.1
# hooks:
# - id: bashate
# args: ["--ignore=E006,E010,E020"]
# FIXME
# Shell script linter
# - repo: https://github.com/shellcheck-py/shellcheck-py
# rev: "v0.10.0.1"
# hooks:
# - id: shellcheck
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
# Ignore old internal README that will not be rendered as docs page
args: ["--fix", "--ignore", "internal/gtc2024/README.md"]
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
args: ["--enable", "all", "--max-line-length", "92"]
exclude: ^(.*)generated/(.*)\.rst$
default_language_version:
python: python310