pre-commit: use TekWizely/pre-commit-golang for Go

This commit is contained in:
leo 2023-02-25 19:10:38 +01:00
parent 049d6879d1
commit ece4d1335c
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -8,6 +8,13 @@ repos:
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-mod-tidy
- id: go-test-mod
- id: golangci-lint-mod
- id: go-build-mod
- repo: local
hooks:
- id: statix
@ -31,27 +38,6 @@ repos:
pass_filenames: false
files: "flake.(nix|lock)$"
language: system
- id: go-mod-tidy
name: go-mod-tidy
entry: bash -c 'cd ./p2 && go mod tidy'
files: '\.(go|mod|sum)$'
language: system
- id: go-unit-tests
name: go-unit-tests
entry: bash -c "cd ./p2 && go test -v ./..."
files: '\.go$'
language: system
- id: golangci-lint
name: golangci-lint
entry: bash -c 'cd p2 && golangci-lint run'
# types: [go]
pass_filenames: false
language: system
- id: go-build
name: go-build
entry: bash -c 'cd ./p2 && go build -v .'
language: system
- id: nix-build-py
name: nix build py
entry: nix build .#p1