-
Notifications
You must be signed in to change notification settings - Fork 742
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
144 lines (143 loc) · 4.01 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
144 lines (143 loc) · 4.01 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
137
138
139
140
141
142
143
144
---
exclude: >
(?x)^(
examples/broken/encoding.yml|
examples/broken/encoding.j2|
examples/broken/yaml-with-tabs/invalid-due-tabs.yaml|
examples/broken/load-failure-invalid.yml|
examples/playbooks/collections/.*|
examples/playbooks/vars/empty.transformed.yml|
examples/playbooks/vars/empty.yml|
src/ansiblelint/schemas/rulebook.json|
test/schemas/data/licenses.json|
test/schemas/negative_test|
test/schemas/package-lock.json
)$
repos:
- repo: meta
hooks:
- id: check-useless-excludes
priority: 0
- repo: https://github.com/ansible/actions
rev: v1.1.2
hooks:
- id: toml
priority: 0
- id: mypy
priority: 2
- id: ruff
priority: 1
- id: cspell
priority: 0
- id: codespell
priority: 1
- id: pyright
priority: 5
- id: codecov
priority: 0
# - id: shellcheck
# priority: 0
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.21
hooks:
- id: uv-sync
- id: uv-lock
- id: uv-lock
name: "deps: upgrade via uv sync --upgrade"
alias: deps
args: ["--upgrade"]
stages: [manual]
- id: uv-export
name: "deps: regenerate requirements-lock.txt for actions"
args:
- "--no-default-groups"
- "--no-dev"
- "--no-emit-package"
- ansible-core
- "--no-emit-package"
- resolvelib
- "--no-emit-package"
- ruamel-yaml-clib
- "--no-emit-package"
- tomli
- "--no-emit-package"
- typing-extensions
- "--no-emit-project"
- "--no-hashes"
- "-o"
- ".config/requirements-lock.txt"
- repo: https://github.com/biomejs/pre-commit
rev: "v2.5.0"
hooks:
- id: biome-check
name: biome
alias: biome
args: [--unsafe]
priority: 0
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
# ignore formatting-prettier to have an accurate prettier comparison
exclude: >
(?x)^(
test/eco/.*.result|
examples/yamllint/.*|
test/fixtures/formatting-before/.*|
test/fixtures/formatting-prettier/.*
)$
- id: trailing-whitespace
exclude: >
(?x)^(
examples/playbooks/(with-skip-tag-id|unicode|with-multiple-yaml-violations).yml|
examples/playbooks/example.yml|
examples/yamllint/.*|
test/eco/.*.result|
test/fixtures/formatting-before/.*
)$
- id: mixed-line-ending
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint
exclude: >
(?x)^(
examples/playbooks/templates/.*|
examples/playbooks/transform-yaml-comments.yml|
examples/yamllint/.*|
examples/other/some.j2.yaml|
examples/playbooks/collections/.*|
test/fixtures/formatting-before/.*
)$
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/jendrikseipp/vulture
rev: v2.16
hooks:
- id: vulture
- repo: https://github.com/ansible/team-devtools
rev: v26.4.0
hooks:
- id: check-platform-constraints
priority: 1
- # keep at bottom as these are slower
repo: local
hooks:
- id: schemas
name: update json schemas
entry: python3 src/ansiblelint/schemas/__main__.py
language: python
pass_filenames: false
always_run: true
# stages: [manual]