Skip to content

Commit

Permalink
Add Golang linting to pre-commit
Browse files Browse the repository at this point in the history
This is a copy of what we use in our Terraform Provider repo, but we can
add/remove/tweak any of these per the documentation at
https://github.com/dnephin/pre-commit-golang.
  • Loading branch information
mitchnielsen committed Sep 19, 2024
1 parent c715436 commit b6c9566
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,14 @@ repos:
- id: yamllint
args:
- --strict

- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
- id: validate-toml
- id: golangci-lint
- id: go-unit-tests
- id: go-mod-tidy

0 comments on commit b6c9566

Please sign in to comment.