forked from openstack-k8s-operators/ci-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
47 lines (44 loc) · 1.39 KB
/
.pre-commit-config.yaml
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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
# First execution of shellcheck reports all findings without failing
# Second execution outputs nothing and fails if any finding meets the
# defined severity.
# The outcome is all findings are reported but only ones meeting the severity
# will fail the check.
# Ignores the following rules:
# SC2071: todo(Lewis): Will fix in a follow up patch
- 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
--exclude=SC2071
"$@"' --
# 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
# todo(Lewis): Update version when we bump to python>=3.10
- repo: https://github.com/ansible/ansible-lint
rev: v6.22.2
hooks:
- id: ansible-lint
additional_dependencies:
- netaddr
- jmespath