forked from GoogleCloudPlatform/cluster-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
105 lines (104 loc) · 3.03 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.82.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_validate
args:
- --hook-config=--retry-once-with-cleanup=true
- repo: local
hooks:
- id: terraform-readme
name: terraform-readme
entry: tools/autodoc/terraform_docs.sh
language: script
types: [terraform]
exclude: (\.terraform|pkg\/.*$)|(tools/validate_configs/golden_copies/.*)
pass_filenames: true
require_serial: true
- id: packer-readme
name: packer-readme
entry: tools/autodoc/terraform_docs.sh
language: script
files: ^.*\.pkr\.hcl$
pass_filenames: true
require_serial: true
- id: duplicate-diff
name: duplicate-diff
entry: python3 tools/duplicate-diff.py
language: python
language_version: python3
files: '.*(\.sh|\.tf|\.tftpl)$'
pass_filenames: true
require_serial: true
- id: module-label-check
name: module-label-check
entry: python3 tools/label-check.py
language: python
language_version: python3
files: '.*\.tf$'
pass_filenames: false
require_serial: true
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-lint
- id: go-imports
- id: go-cyclo
args: [-over=15]
- id: go-unit-tests
- id: go-build
- id: go-mod-tidy
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-critic
args: [-disable, "#experimental,sloppyTypeAssert"]
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
args: [-c=.yamllint]
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.12
hooks:
- id: pymarkdown
# Rules at https://github.com/jackdewinter/pymarkdown/tree/main/docs/rules
# MD013 - Line length
# MD022 - Headers should be surrounded by blank lines
# MD033 - Inline HTML
# MD034 - Bare URL used
# MD041 - First line in file should be a top level header
# MD046 - Code block style
args: [--disable-rules, "MD013,MD022,MD033,MD034,MD041,MD046", scan]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: "3.0.0"
hooks:
- id: script-must-have-extension
- id: shellcheck
- id: shfmt
exclude: ".*tpl"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
exclude: tools/validate_configs/golden_copies/.*