From 4e01c18db0f25b7b55cdfb848214db1abe98e626 Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Sat, 4 Nov 2023 00:08:57 +0100 Subject: [PATCH] Update golangci-lint and gocovdiff (#56) --- README.md | 2 +- makefiles/base.mk | 2 +- scripts/lint.sh | 2 +- templates/github/workflows/golangci-lint.yml | 2 +- templates/github/workflows/test-integration.yml | 4 ++-- templates/github/workflows/test-unit.yml | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index abaa678..d899f45 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project. Add `Makefile` to your module with includes standard targets. ```Makefile -#GOLANGCI_LINT_VERSION := "v1.54.1" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.55.2" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/makefiles/base.mk b/makefiles/base.mk index e820993..4027c74 100644 --- a/makefiles/base.mk +++ b/makefiles/base.mk @@ -1,4 +1,4 @@ -#GOLANGCI_LINT_VERSION := "v1.54.1" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.55.2" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/scripts/lint.sh b/scripts/lint.sh index d387671..6af3ea3 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash [ -z "$GO" ] && GO=go -[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.54.1" +[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.55.2" # detecting GOPATH and removing trailing "/" if any GOPATH="$(go env GOPATH)" diff --git a/templates/github/workflows/golangci-lint.yml b/templates/github/workflows/golangci-lint.yml index d2e4b61..5e985cc 100644 --- a/templates/github/workflows/golangci-lint.yml +++ b/templates/github/workflows/golangci-lint.yml @@ -27,7 +27,7 @@ jobs: uses: golangci/golangci-lint-action@v3.7.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.54.1 + version: v1.55.2 # Optional: working directory, useful for monorepos # working-directory: somedir diff --git a/templates/github/workflows/test-integration.yml b/templates/github/workflows/test-integration.yml index ae6542b..572b007 100644 --- a/templates/github/workflows/test-integration.yml +++ b/templates/github/workflows/test-integration.yml @@ -85,9 +85,9 @@ jobs: id: annotate if: github.event.pull_request.base.sha != '' run: | - curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.0/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz + curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz gocovdiff_hash=$(git hash-object ./gocovdiff) - [ "$gocovdiff_hash" == "8e507e0d671d4d6dfb3612309b72b163492f28eb" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1) + [ "$gocovdiff_hash" == "c37862c73a677e5a9c069470287823ab5bbf0244" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1) git fetch origin master ${{ github.event.pull_request.base.sha }} REP=$(./gocovdiff -cov integration.coverprofile -gha-annotations gha-integration.txt -delta-cov-file delta-cov-integration.txt -target-delta-cov ${TARGET_DELTA_COV}) echo "${REP}" diff --git a/templates/github/workflows/test-unit.yml b/templates/github/workflows/test-unit.yml index 1ec1c72..4214222 100644 --- a/templates/github/workflows/test-unit.yml +++ b/templates/github/workflows/test-unit.yml @@ -88,9 +88,9 @@ jobs: id: annotate if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != '' run: | - curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.0/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz + curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz gocovdiff_hash=$(git hash-object ./gocovdiff) - [ "$gocovdiff_hash" == "f191b45548bb65ec2c7d88909679a57116ff1ba1" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1) + [ "$gocovdiff_hash" == "c37862c73a677e5a9c069470287823ab5bbf0244" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1) git fetch origin master ${{ github.event.pull_request.base.sha }} REP=$(./gocovdiff -mod github.com/$GITHUB_REPOSITORY -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV}) echo "${REP}"