forked from rackerlabs/understack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
117 lines (117 loc) · 3.82 KB
/
.pre-commit-config.yaml
File metadata and controls
117 lines (117 loc) · 3.82 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: '\.patch'
- id: end-of-file-fixer
exclude: '^docs/overrides'
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: check-merge-conflict
- id: check-yaml
args:
- --allow-multiple-documents
exclude: "mkdocs.yml"
- id: check-yaml
name: check-yaml-mkdocs
# --unsafe is a workaround for the use of !! in mkdocs.yml
args: [--unsafe]
files: mkdocs.yml
- id: check-symlinks
- repo: https://github.com/adrienverge/yamllint
rev: v1.33.0
hooks:
- id: yamllint
args: [-c, .yamllint.yaml]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
hooks:
- id: check-jsonschema
name: validate argo workflows / workflowtemplates
args:
- --schemafile
- schema/argo-workflows.json
files: "workflows/argo-events/workflowtemplates/.*.(yml|yaml)$"
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
files: '^docs/'
- repo: https://github.com/crate-ci/typos
rev: v1.26.8
hooks:
- id: typos
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/ansible/ansible-lint
rev: v25.1.2
hooks:
- id: ansible-lint
entry: "sh -c 'cd ansible && python3 -m ansiblelint -v --force-color'"
verbose: true
always_run: false
additional_dependencies:
- ansible
- jmespath
files: '^ansible/.*'
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.7.13
hooks:
- id: uv-lock
name: cinder-understack
args: ["-D", "python/cinder-understack"]
- id: uv-lock
name: diff-nautobot-understack
args: ["-D", "python/diff-nautobot-understack"]
- id: uv-lock
name: ironic-understack
args: ["-D", "python/ironic-understack"]
- id: uv-lock
name: neutron-understack
args: ["-D", "python/neutron-understack"]
- id: uv-lock
name: understack-flavor-matcher
args: ["-D", "python/understack-flavor-matcher"]
- id: uv-lock
name: understack-workflows
args: ["-D", "python/understack-workflows"]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 40.8.1
hooks:
- id: renovate-config-validator
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.387
hooks:
- id: pyright
files: '^python/understack-workflows/'
args: ["--threads"]
additional_dependencies:
# python-pyright stupidly does not allow local paths
# https://github.com/pre-commit/pre-commit/issues/1752#issuecomment-754252663
- "git+https://github.com/rackerlabs/understack.git@main#subdirectory=python/understack-flavor-matcher"
- "kubernetes"
- "pydantic"
- "pynautobot"
- "pytest"
- "pytest-mock"
- "pytest_lazy_fixtures"
- "python-ironicclient"
- "requests"
- "sushy"
- "types-requests"
- repo: local
hooks:
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
# uncomment this if you don't want to use docker version
# entry: bash -c 'trufflehog --no-update git file://. --since-commit HEAD --results=verified,unknown --fail'
entry: bash -c 'docker run --rm -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --results=verified,unknown --fail'
language: system
stages: ["pre-commit", "pre-push"]