forked from GoogleCloudPlatform/cluster-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
86 lines (85 loc) · 2.46 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
# 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.64.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_validate
- repo: local
hooks:
- id: terraform-readme
name: terraform-readme
entry: tools/autodoc/terraform_docs.sh
language: script
types: ['terraform']
exclude: \.terraform\/.*$
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
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
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-beta.5
hooks:
- id: go-critic
args: [-disable, "#experimental,sloppyTypeAssert"]
- repo: https://github.com/ansible/ansible-lint.git
rev: v5.4.0
hooks:
- id: ansible-lint
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
args: [-c=.yamllint]
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.5
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: "2.1.6" # or specific git tag
hooks:
- id: script-must-have-extension
- id: shellcheck
- id: shfmt
exclude: ".*tpl"