1
1
---
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ # SPDX-FileCopyrightText: 2024 The Linux Foundation
4
+
2
5
ci :
3
- autofix_commit_msg : " Chore: pre-commit autoupdate "
6
+ autofix_commit_msg : " Chore: pre-commit.ci automated update "
4
7
5
8
exclude : |
6
9
(?x)^(
@@ -9,37 +12,52 @@ exclude: |
9
12
)$
10
13
11
14
repos :
12
-
13
15
- repo : https://github.com/pre-commit/pre-commit-hooks
14
16
rev : v5.0.0
15
17
hooks :
16
18
- id : check-added-large-files
19
+ - id : check-ast
20
+ - id : check-builtin-literals
17
21
- id : check-case-conflict
22
+ - id : check-docstring-first
18
23
- id : check-executables-have-shebangs
24
+ - id : check-illegal-windows-names
19
25
- id : check-json
20
26
- id : check-merge-conflict
21
27
- id : check-shebang-scripts-are-executable
22
28
- id : check-symlinks
23
29
- id : check-toml
24
- # - id: detect-aws-credentials
30
+ - id : check-vcs-permalinks
25
31
- id : check-xml
26
32
- id : check-yaml
33
+ - id : debug-statements
34
+ - id : destroyed-symlinks
35
+ - id : detect-aws-credentials
36
+ args : ["--allow-missing-credentials"]
37
+ # - id: double-quote-string-fixer
27
38
- id : detect-private-key
28
39
- id : end-of-file-fixer
29
- # - id: mixed-line-ending
30
- # args: ["--fix=lf"]
40
+ - id : file-contents-sorter
41
+ - id : fix-byte-order-marker
42
+ - id : forbid-new-submodules
43
+ - id : forbid-submodules
44
+ - id : mixed-line-ending
45
+ args : ["--fix=lf"]
31
46
- id : name-tests-test
32
47
args : ["--pytest-test-first"]
33
48
- id : no-commit-to-branch
34
49
# - id: pretty-format-json
35
50
- id : requirements-txt-fixer
51
+ - id : sort-simple-yaml
52
+ # Without specifying files, the above is inactive
53
+ # files: ^config/simple/
54
+ - id : trailing-whitespace
36
55
37
56
- repo : https://github.com/pre-commit/mirrors-prettier
38
57
rev : v4.0.0-alpha.8
39
58
hooks :
40
59
- id : prettier
41
- args :
42
- ['--no-error-on-unmatched-pattern', '--ignore-unknown']
60
+ args : ["--no-error-on-unmatched-pattern", "--ignore-unknown"]
43
61
44
62
- repo : https://github.com/igorshubovych/markdownlint-cli
45
63
rev : v0.44.0
51
69
rev : v0.19.1
52
70
hooks :
53
71
- id : gitlint
72
+ args : ["-c body-max-line-length=120", "-c title-max-length=120"]
54
73
55
74
- repo : https://github.com/openstack/bashate
56
75
rev : 2.1.1
62
81
rev : v0.10.0.1
63
82
hooks :
64
83
- id : shellcheck
65
- args : ["-x"] # Check external files
84
+ args : ["-x"] # Check external files
66
85
67
86
- repo : https://github.com/Mateusz-Grzelinski/actionlint-py
68
87
rev : v1.7.7.23
@@ -73,9 +92,12 @@ repos:
73
92
rev : v1.35.1
74
93
hooks :
75
94
- id : yamllint
95
+ types : [yaml]
76
96
args :
77
- ["-d", "{rules : {line-length: {max: 120}},
78
- ignore-from-file : [.gitignore],}"]
97
+ [
98
+ " -d" ,
99
+ " {rules: {line-length: {max: 100}}, ignore-from-file: [.gitignore],}" ,
100
+ ]
79
101
80
102
- repo : https://github.com/astral-sh/ruff-pre-commit
81
103
rev : v0.9.9
@@ -90,8 +112,14 @@ repos:
90
112
name : " create mypy cache"
91
113
language : system
92
114
pass_filenames : false
93
- entry : bash -c 'if [ ! -d .mypy_cache ];
94
- then /bin/mkdir .mypy_cache; fi; exit 0'
115
+ entry : bash -c 'if [ ! -d .mypy_cache ]; then /bin/mkdir .mypy_cache; fi; exit 0'
116
+
117
+ - repo : https://github.com/abravalheri/validate-pyproject
118
+ rev : v0.23
119
+ hooks :
120
+ - id : validate-pyproject
121
+ # Optional extra validations from SchemaStore:
122
+ additional_dependencies : ["validate-pyproject-schema-store[all]"]
95
123
96
124
- repo : https://github.com/pre-commit/mirrors-mypy
97
125
rev : " v1.15.0"
@@ -101,17 +129,26 @@ repos:
101
129
args : ["--show-error-codes", "--install-types", "--non-interactive"]
102
130
additional_dependencies : ["pytest", "types-requests"]
103
131
104
- # yamllint disable rule:comments-indentation
132
+ # - repo: https://github.com/fsfe/reuse-tool
133
+ # rev: v5.0.2
134
+ # hooks:
135
+ # - id: reuse
136
+
137
+ # - repo: https://github.com/btford/write-good
138
+ # rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
139
+ # hooks:
140
+ # - id: write-good
141
+ # files: "\\.(rst|md|markdown|mdown|mkdn)$"
142
+
105
143
# Check for misspellings in documentation files
106
144
# - repo: https://github.com/codespell-project/codespell
107
145
# rev: v2.2.2
108
146
# hooks:
109
- # - id: codespell
147
+ # - id: codespell
110
148
111
149
# Automatically upgrade Python syntax for newer versions
112
150
# - repo: https://github.com/asottile/pyupgrade
113
151
# rev: v3.15.0
114
152
# hooks:
115
153
# - id: pyupgrade
116
154
# args: ['--py37-plus']
117
- # yamllint enable rule:comments-indentation
0 commit comments