-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
136 lines (118 loc) · 4.21 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
136 lines (118 loc) · 4.21 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
133
134
135
136
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation
ci:
autofix_prs: false
# pre-commit.ci sandbox prevents network calls; disable gha-workflow-linter
skip: [gha-workflow-linter]
autofix_commit_msg: |
Chore: pre-commit autofixes
Signed-off-by: pre-commit-ci[bot] <pre-commit-ci@users.noreply.github.com>
autoupdate_commit_msg: |
Chore: pre-commit autoupdate
Signed-off-by: pre-commit-ci[bot] <pre-commit-ci@users.noreply.github.com>
exclude: "^docs/conf.py"
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: 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: 1f1e8bf348ff38fc88619a38d3ca4d9c56abea49 # frozen: v0.16.5
hooks:
- id: ruff
files: ^(scripts|tests|custom_components)/.+\.py$
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
files: ^(scripts|tests|custom_components)/.+\.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 7ff8d35ae36a7d2b968f2f90b4c723e292e594ee # frozen: v2.3.1
hooks:
- id: mypy
- repo: https://github.com/btford/write-good
rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
hooks:
- id: write-good
files: "\\.(rst|md|markdown|mdown|mkdn)$"
args: ["--no-tooWordy"]
exclude: |
(?x)^(
docs/|
CONTRIBUTING\.md|
SECURITY\.md
)
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: a6564f5d57444e123433a5c9af733e3975c77229 # frozen: v0.11.0.1-1
hooks:
- id: shellcheck
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: 5b5dddc4fb0f83c3ea1fc5616fa63e115dce83e0 # frozen: v0.49.1
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 precommit.ci/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: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
hooks:
- id: codespell
args: ["--ignore-words=.codespell"]
# Requires a mirror, primary repo lacks .pre-commit-hooks.yaml
- repo: https://github.com/DetachHead/basedpyright-prek-mirror
rev: 3c94d276aa3005fa1f5a977946c9dc106135c083 # frozen: 1.39.10
hooks:
- id: basedpyright
- repo: https://github.com/lfreleng-actions/gha-workflow-linter
rev: cae470a1e8988c3cacbe9cc40a0d6b8e6881bde2 # frozen: v1.5.5
hooks:
- id: gha-workflow-linter
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: c4654a7e007c9619a5eb63c39a456572a0fa1851 # frozen: 0.38.0
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