pre-commit: use TekWizely/pre-commit-golang for Go
This commit is contained in:
parent
049d6879d1
commit
ece4d1335c
@ -8,6 +8,13 @@ repos:
|
|||||||
- repo: meta
|
- repo: meta
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-hooks-apply
|
- 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
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: statix
|
- id: statix
|
||||||
@ -31,27 +38,6 @@ repos:
|
|||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
files: "flake.(nix|lock)$"
|
files: "flake.(nix|lock)$"
|
||||||
language: system
|
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
|
- id: nix-build-py
|
||||||
name: nix build py
|
name: nix build py
|
||||||
entry: nix build .#p1
|
entry: nix build .#p1
|
||||||
|
Loading…
Reference in New Issue
Block a user