-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
132 lines (116 loc) · 4.4 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
132 lines (116 loc) · 4.4 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation
# Run with prek (https://github.com/j178/prek), a drop-in, faster
# replacement for pre-commit. The configuration format is unchanged.
ci:
autofix_commit_msg: "Chore: pre-commit autofixes"
autoupdate_commit_msg: "Chore: pre-commit autoupdate"
# pre-commit.ci sandbox prevents network calls; disable network hooks
skip: [gha-workflow-linter]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
args:
- --branch=dev
- --branch=master
- --branch=main
- --branch=rc
- --branch=production
- repo: https://github.com/jorisroovers/gitlint
rev: acc9d9de6369b76d22cb4167029d2035e8730b98 # frozen: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/adrienverge/yamllint.git
rev: cba56bcde1fdd01c1deb3f945e69764c291a6530 # frozen: v1.38.0
hooks:
- id: yamllint
types: [yaml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 22f0422809455ec89ffdcf5a00170ba816e42ddb # frozen: v0.15.16
hooks:
- id: ruff
files: ^(docs_conf|tests)/.+\.py$|^setup\.py$
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
files: ^(docs_conf|tests)/.+\.py$|^setup\.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: d2823d321df3af8f878f7ee3414dc94d037145b9 # frozen: v2.1.0
hooks:
- id: mypy
files: ^docs_conf/.+\.py$
# The dynamic Sphinx config loader resolves settings from YAML at
# runtime and re-exports them via `*`; static typing is not useful.
exclude: ^docs_conf/conf\.py$
additional_dependencies: ["types-PyYAML"]
- repo: https://github.com/btford/write-good
rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
hooks:
- id: write-good
files: "\\.(rst|md|markdown|mdown|mkdn)$"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: e72a3ca1632f0b11a07d171449fe447a7ff6795e # frozen: v0.48.0
hooks:
- id: markdownlint
args: ["--fix"]
- repo: https://github.com/fsfe/reuse-tool
rev: 9fabf9eb815a57aac116b435e8346c200cdb8604 # frozen: v6.2.0
hooks:
- id: reuse
# Replaces: https://github.com/rhysd/actionlint
# Permits actionlint to run both locally and with prek/GitHub
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: c04ed26e40637cab1aa9879c693832a9c120fb20 # frozen: v1.7.12.24
hooks:
- id: actionlint
# Check for misspellings in documentation files
- repo: https://github.com/codespell-project/codespell
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
hooks:
- id: codespell
args:
- --skip=*.po,*.ts,./relnotes,./releasenotes,./dist,./node_modules,./AUTHORS,./ChangeLog
# Requires a mirror, primary repo lacks .pre-commit-hooks.yaml
- repo: https://github.com/DetachHead/basedpyright-prek-mirror
rev: 1a17bc2de06c96f36d9285331bf7fc2e399804d6 # frozen: 1.39.7
hooks:
- id: basedpyright
files: ^docs_conf/.+\.py$
exclude: ^docs_conf/conf\.py$
- repo: https://github.com/lfreleng-actions/gha-workflow-linter
rev: 282030acf19607dfd6c592f8263a81941ed06e90 # frozen: v1.1.1
hooks:
- id: gha-workflow-linter
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 943377262562a12b57292fc98fabd7dbf81451fe # frozen: 0.37.2
hooks:
- id: check-github-actions
- id: check-github-workflows
- id: check-jsonschema
name: Check GitHub Workflows set timeout-minutes
args:
- --builtin-schema
- github-workflows-require-timeout
files: ^\.github/workflows/[^/]+$
types:
- yaml
- id: check-readthedocs