-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
114 lines (103 loc) · 2.97 KB
/
.pre-commit-config.yaml
File metadata and controls
114 lines (103 loc) · 2.97 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.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']
- id: pretty-format-json
args: ['--no-sort-keys','--autofix']
exclude_types: [jupyter]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Mypy: static type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.18.1"
hooks:
- id: mypy
# Envorce only one source of configuration.
args: ["--config-file", "pyproject.toml"]
additional_dependencies:
- cuda-core
- cuda-bindings>=12.9.2,<13
- cupy-cuda12x
- mpi4py>=4.1.0
- numba
- numba-cuda
- numpy
- pytest
- scipy
- torch
- types-cffi
- invoke
- cython>=3.0.4,!=3.1.0,!=3.1.1
- tomli
# Spellcheck
- repo: https://github.com/codespell-project/codespell
rev: "v2.4.1"
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.28.0
hooks:
- id: gitleaks
# Bash linter
- repo: https://github.com/openstack/bashate
rev: 2.1.1
hooks:
- id: bashate
args: ["--ignore=E006,E010,E020"]
# Shell script linter
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.11.0.1"
hooks:
- id: shellcheck
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
- id: markdownlint
# Setting up node version explicitly
# https://github.com/igorshubovych/markdownlint-cli/issues/502
language: node
language_version: "22.14.0"
# 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$