Skip to content

Commit a0bc20b

Browse files
committed
Add Go hooks to support go code for our projects
1 parent 7250368 commit a0bc20b

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

.pre-commit-config.yaml

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,69 @@ repos:
3131

3232
# Text file hooks
3333
- repo: https://github.com/igorshubovych/markdownlint-cli
34-
rev: v0.33.0
34+
rev: v0.34.0
3535
hooks:
3636
- id: markdownlint
3737
args:
3838
- --config=.mdl_config.yaml
3939
- repo: https://github.com/pre-commit/mirrors-prettier
40-
rev: v3.0.0-alpha.6
40+
rev: v3.0.0-alpha.9-for-vscode
4141
hooks:
4242
- id: prettier
4343
- repo: https://github.com/adrienverge/yamllint
44-
rev: v1.30.0
44+
rev: v1.31.0
4545
hooks:
4646
- id: yamllint
4747
args:
4848
- --strict
4949

5050
# GitHub Actions hooks
5151
- repo: https://github.com/python-jsonschema/check-jsonschema
52-
rev: 0.22.0
52+
rev: 0.23.0
5353
hooks:
5454
- id: check-github-actions
5555
- id: check-github-workflows
5656

5757
# pre-commit hooks
5858
- repo: https://github.com/pre-commit/pre-commit
59-
rev: v3.2.1
59+
rev: v3.3.1
6060
hooks:
6161
- id: validate_manifest
6262

63+
# Go hooks
64+
- repo: https://github.com/TekWizely/pre-commit-golang
65+
rev: v1.0.0-rc.1
66+
hooks:
67+
# Style Checkers
68+
- id: go-lint
69+
- id: go-critic
70+
# Go Build
71+
- id: go-build-mod
72+
- id: go-build-pkg
73+
- id: go-build-repo-mod
74+
- id: go-build-repo-pkg
75+
76+
# Go Mod Tidy
77+
- id: go-mod-tidy
78+
- id: go-mod-tidy-repo
79+
80+
# Go Test
81+
- id: go-test-mod
82+
- id: go-test-pkg
83+
- id: go-test-repo-mod
84+
- id: go-test-repo-pkg
85+
86+
# Go Vet
87+
- id: go-vet
88+
- id: go-vet-mod
89+
- id: go-vet-pkg
90+
- id: go-vet-repo-mod
91+
- id: go-vet-repo-pkg
92+
# GoSec
93+
- id: go-sec-mod
94+
- id: go-sec-pkg
95+
- id: go-sec-repo-mod
96+
- id: go-sec-repo-pkg
6397
# Shell script hooks
6498
- repo: https://github.com/cisagov/pre-commit-shfmt
6599
rev: v0.0.2
@@ -88,7 +122,7 @@ repos:
88122
args:
89123
- --config=.bandit.yml
90124
- repo: https://github.com/psf/black
91-
rev: 23.1.0
125+
rev: 23.3.0
92126
hooks:
93127
- id: black
94128
- repo: https://github.com/PyCQA/flake8
@@ -102,31 +136,31 @@ repos:
102136
hooks:
103137
- id: isort
104138
- repo: https://github.com/pre-commit/mirrors-mypy
105-
rev: v1.1.1
139+
rev: v1.2.0
106140
hooks:
107141
- id: mypy
108142
- repo: https://github.com/asottile/pyupgrade
109-
rev: v3.3.1
143+
rev: v3.3.2
110144
hooks:
111145
- id: pyupgrade
112146

113147
# Ansible hooks
114148
- repo: https://github.com/ansible-community/ansible-lint
115-
rev: v5.4.0
149+
rev: v6.15.0
116150
hooks:
117151
- id: ansible-lint
118152
# files: molecule/default/playbook.yml
119153

120154
# Terraform hooks
121155
- repo: https://github.com/antonbabenko/pre-commit-terraform
122-
rev: v1.77.1
156+
rev: v1.78.0
123157
hooks:
124158
- id: terraform_fmt
125159
- id: terraform_validate
126160

127161
# Docker hooks
128162
- repo: https://github.com/IamTheFij/docker-pre-commit
129-
rev: v2.1.1
163+
rev: v3.0.1
130164
hooks:
131165
- id: docker-compose-check
132166

0 commit comments

Comments
 (0)