From 295ab05b8bb93ca4f74b735be404381f409d1e0e Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Thu, 29 Oct 2026 20:00:35 +0100 Subject: [PATCH 1/3] Update golangci-lint to v2.15.0 --- README.md | 2 +- makefiles/base.mk | 2 +- scripts/lint.sh | 2 +- templates/github/workflows/golangci-lint.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 59cce8b..a0b8f3d 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 := "v2.11.3" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v2.15.0" # 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 47a73ec..f468671 100644 --- a/makefiles/base.mk +++ b/makefiles/base.mk @@ -1,4 +1,4 @@ -#GOLANGCI_LINT_VERSION := "v2.11.3" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v2.15.0" # 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 5608e98..0b7f722 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="v2.11.3" +[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v2.15.0" # 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 34c9ed4..d4cb6f9 100644 --- a/templates/github/workflows/golangci-lint.yml +++ b/templates/github/workflows/golangci-lint.yml @@ -21,9 +21,9 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: stable + go-version: oldstable - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v9.2.0 + uses: golangci/golangci-lint-action@v9.3.0 with: - version: v2.11.3 + version: v2.15.0 From 6c1929dbc09d546477a4e3095594d42bb92b82b5 Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Thu, 29 Oct 2026 20:16:18 +0100 Subject: [PATCH 2/3] Fix lint install --- scripts/lint.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 0b7f722..a27e977 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -13,7 +13,18 @@ GOPATH=${GOPATH%/} # checking if golangci-lint is available if ! command -v golangci-lint-"$GOLANGCI_LINT_VERSION" >/dev/null; then echo "Installing golangci-lint $GOLANGCI_LINT_VERSION..." - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /tmp "$GOLANGCI_LINT_VERSION" && mv /tmp/golangci-lint "$GOPATH"/bin/golangci-lint-"$GOLANGCI_LINT_VERSION" + tmp=$(mktemp -d) + ver=${GOLANGCI_LINT_VERSION#v} + name=golangci-lint-$ver-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') + url=https://github.com/golangci/golangci-lint/releases/download/$GOLANGCI_LINT_VERSION + curl -sSfL "$url/$name.tar.gz" -o "$tmp/$name.tar.gz" && + curl -sSfL "$url/golangci-lint-$ver-checksums.txt" -o "$tmp/sums" && + # anchored match: checksums also list "$name.tar.gz.sbom.json" since v2.15.0 + want=$(grep -F " $name.tar.gz" "$tmp/sums" | grep -v sbom | awk '{print $1}') && + [ "$(shasum -a 256 "$tmp/$name.tar.gz" | awk '{print $1}')" = "$want" ] && + tar -xzf "$tmp/$name.tar.gz" -C "$tmp" && + mv "$tmp/$name/golangci-lint" "$GOPATH"/bin/golangci-lint-"$GOLANGCI_LINT_VERSION" + rm -rf "$tmp" fi this_path=$(dirname "$0") From 2c233cf781bc26e9921be461c75e6b02224387ee Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Thu, 29 Oct 2026 20:18:33 +0100 Subject: [PATCH 3/3] Fix lint --- scripts/.golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/.golangci.yml b/scripts/.golangci.yml index 0a528da..263ce98 100644 --- a/scripts/.golangci.yml +++ b/scripts/.golangci.yml @@ -5,6 +5,7 @@ run: linters: default: all disable: + - exhaustruct_v5 - embeddedstructfieldcheck - nilnil - noinlineerr