forked from openstack-k8s-operators/neutron-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
86 lines (81 loc) · 2.5 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
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
repos:
- repo: local
hooks:
- id: gotidy
name: gotidy
language: system
entry: make
args: ["tidy"]
pass_filenames: false
- id: make-manifests
name: make-manifests
language: system
entry: make
args: ['manifests']
pass_filenames: false
- id: make-generate
name: make-generate
language: system
entry: make
args: ['generate']
pass_filenames: false
- id: make-bundle
name: make-bundle
language: system
entry: make
args: ['bundle', 'VERSION=0.0.1']
pass_filenames: false
- id: make-operator-lint
name: make-operator-lint
language: system
entry: make
args: ['operator-lint']
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
exclude: ^vendor
- id: check-shebang-scripts-are-executable
exclude: ^vendor
- id: check-merge-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: check-yaml
args: [-m]
exclude: "^templates/(openstackconfiggenerator|openstackcontrolplane)/.*$"
- id: check-json
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^vendor
- id: no-commit-to-branch
- id: trailing-whitespace
exclude: ^vendor
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.1.1
hooks:
- id: bashate
entry: bashate --error . --ignore=E006,E040,E020,E012
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)
# E020: Function declaration not in format ^function name {$
# E012: here doc didn't end before EOF
- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
hooks:
- id: golangci-lint-full
args: ["-v"]
- repo: https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci
# NOTE(gibi): we cannot automatically track main here
# see https://pre-commit.com/#using-the-latest-version-for-a-repository
rev: e30d72fcbced0ab8a7b6d23be1dee129e2a7b849
hooks:
- id: kuttl-single-test-assert