-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (82 loc) · 2.39 KB
/
.pre-commit-config.yaml
File metadata and controls
89 lines (82 loc) · 2.39 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
args: ["--unsafe"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
verbose: true
entry: >
bash -c 'shellcheck "$@" ||
shellcheck -f quiet
--severity=error
"$@"' --
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
- repo: local
hooks:
- id: NNCP validate
name: Check NNCP with nmstate validate
entry: ./ci/nmstate_validate.py
language: python
additional_dependencies:
- pyyaml
files: 'nncp\.(yaml|yml)$'
exclude: '/shared_nncp\.(yaml|yml)$'
types: [file, yaml]
- id: poap-md5sum-management
name: Format POAP script with md5sum management
entry: scenarios/sno-nxsw/manage-poap-md5sum.sh
language: system
files: ^scenarios/sno-nxsw/poap\.py$
pass_filenames: false
- id: networking-lab-poap-md5sums
name: Format networking-lab POAP scripts with md5sum management
entry: scenarios/networking-lab/manage-poap-md5sums.sh
language: system
files: ^scenarios/networking-lab/.*-poap\.py$
pass_filenames: false
- repo: https://github.com/ansible/ansible-lint
rev: v6.22.2
hooks:
- id: ansible-lint
additional_dependencies:
- ansible-core
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args:
- --write-changes
- --ignore-words=.codespell.ignore
# "Sha1-Halud” worm - disable for now.
# Sha1-Halud” worm
# - repo: https://github.com/DavidAnson/markdownlint-cli2
# rev: v0.18.1
# hooks:
# - id: markdownlint-cli2
# args:
# - --fix