From aca8af305551a7713aa6d09f64befdc192a15616 Mon Sep 17 00:00:00 2001 From: Martin Majlis <122797378+martin-majlis-s1@users.noreply.github.com> Date: Thu, 27 Jul 2023 15:01:18 +0200 Subject: [PATCH] Fix failing pre-commit checks (#45) --- .pre-commit-config.yaml | 22 ++-------------------- scripts/install-dev-tools.sh | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c72e3d..702f757 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,33 +22,15 @@ repos: test/testdata/buffer_test_payload_full.json ) - id: trailing-whitespace - - repo: https://github.com/dnephin/pre-commit-golang - rev: v0.5.1 - hooks: - - id: go-fmt - - id: go-imports - - id: go-cyclo - - id: validate-toml - - id: no-go-testing - - id: golangci-lint - # - id: go-critic - # # args: [-disable=sloppyTypeAssert] - # args: ["-v", "-enable='yodaStyleExpr'", "-disable=sloppyTypeAssert"] - # there is timeout of 30s for go-unit-test and we need more - # - id: go-unit-tests - - id: go-build - - id: go-mod-tidy - - id: go-mod-vendor - repo: https://github.com/Bahjat/pre-commit-golang rev: v1.0.3 hooks: - id: go-fmt-import - id: go-lint - # - id: go-unit-tests - id: gofumpt - id: go-err-check - # - id: go-static-check - # - id: golangci-lint + - id: golangci-lint + - id: go-static-check # - id: go-ruleguard # requires https://github.com/quasilyte/go-ruleguard # args: [rules/rules.go] # required diff --git a/scripts/install-dev-tools.sh b/scripts/install-dev-tools.sh index 3405a48..ee4a054 100755 --- a/scripts/install-dev-tools.sh +++ b/scripts/install-dev-tools.sh @@ -8,4 +8,4 @@ go install -v github.com/BurntSushi/toml/cmd/tomlv@latest go install -v mvdan.cc/gofumpt@latest go install -v github.com/kisielk/errcheck@latest # go install -v github.com/quasilyte/go-ruleguard/cmd/ruleguard@latest -# go install -v honnef.co/go/tools/cmd/staticcheck@latest +go install -v honnef.co/go/tools/cmd/staticcheck@latest