From 2bf4b6ad6f1480a01aef67c773c07acb823445c5 Mon Sep 17 00:00:00 2001 From: akrem-chabchoub Date: Thu, 22 Oct 2026 10:35:55 +0200 Subject: [PATCH 1/2] chore: update Go version and golangci-lint version to 1.27.3 and 2.14.0 respectively --- .github/workflows/go.yml | 2 +- AGENTS.md | 4 ++-- Dockerfile | 2 +- Makefile | 2 +- go.mod | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f15e487d..85f55847 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -28,7 +28,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v9 with: - version: v2.10.1 + version: v2.14.0 args: --timeout 10m skip-cache: false - name: Vet diff --git a/AGENTS.md b/AGENTS.md index 6b281c28..9362f429 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,14 +17,14 @@ Beekeeper consumes Bee as a library (`github.com/ethersphere/bee/v2` in `go.mod` ```bash make binary # build ./dist/beekeeper (CGO disabled, version stamped via -ldflags) make test # unit tests: go test -v ./pkg/... -make lint # golangci-lint (pinned v2.10.1; auto-installs if missing) +make lint # golangci-lint (pinned v2.14.0; auto-installs if missing) ``` Run a single test: `go test -run TestName ./pkg//...` (add `-race` to mirror CI). CI (`.github/workflows/go.yml`) runs `make vet`, `make check-whitespace`, golangci-lint, `make build`, and `make test`. PR titles are linted as Conventional Commits (`.github/workflows/pr-title.yml`). -Requires Go 1.26. For a full local cluster (K3s/k3d + Geth), follow the **Local Development** quick start in `README.md`. +Requires Go 1.27. For a full local cluster (K3s/k3d + Geth), follow the **Local Development** quick start in `README.md`. ## How a run is wired together diff --git a/Dockerfile b/Dockerfile index 348ba42e..acc83de6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.26 AS build +FROM golang:1.27.3 AS build WORKDIR /src # enable modules caching in separate layer diff --git a/Makefile b/Makefile index 86744fd9..afe14abe 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO ?= go GOLANGCI_LINT ?= golangci-lint -GOLANGCI_LINT_VERSION ?= v2.10.1 +GOLANGCI_LINT_VERSION ?= v2.14.0 COMMIT ?= "$(shell git describe --long --dirty --always --match "" || true)" VERSION ?= "$(shell git describe --tags --abbrev=0 | cut -c2-)" LDFLAGS ?= -s -w \ diff --git a/go.mod b/go.mod index fec09f5a..462eefa0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ethersphere/beekeeper -go 1.26 +go 1.27.3 replace github.com/codahale/hdrhistogram => github.com/HdrHistogram/hdrhistogram-go v1.1.2 From 3314bc991c8798f634b8edad252f5898a237de09 Mon Sep 17 00:00:00 2001 From: akrem-chabchoub Date: Mon, 26 Oct 2026 12:52:22 +0100 Subject: [PATCH 2/2] chore: update golangci-lint configuration and fix type check in tests --- .golangci.yml | 5 +++++ pkg/bee/file.go | 2 +- pkg/k8s/k8s_test.go | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d239909b..81e44cc7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,6 +8,11 @@ linters: - misspell - nilerr - unconvert + settings: + goconst: + exclude-types: + - Call + - CompositeLit exclusions: generated: lax presets: diff --git a/pkg/bee/file.go b/pkg/bee/file.go index b6592892..02d7597b 100644 --- a/pkg/bee/file.go +++ b/pkg/bee/file.go @@ -2,13 +2,13 @@ package bee import ( "bytes" + "crypto/sha3" "fmt" "hash" "io" "math/rand" "github.com/ethersphere/bee/v2/pkg/swarm" - "golang.org/x/crypto/sha3" ) // File represents Bee file diff --git a/pkg/k8s/k8s_test.go b/pkg/k8s/k8s_test.go index 8d6bf9e3..cb81085a 100644 --- a/pkg/k8s/k8s_test.go +++ b/pkg/k8s/k8s_test.go @@ -154,7 +154,7 @@ func TestNewClient(t *testing.T) { fieldVal := val.Field(i) // Check if the field is nil. - if (fieldVal.Kind() == reflect.Interface || fieldVal.Kind() == reflect.Ptr) && fieldVal.IsNil() { + if (fieldVal.Kind() == reflect.Interface || fieldVal.Kind() == reflect.Pointer) && fieldVal.IsNil() { t.Errorf("nil not expected for '%s' property", val.Type().Field(i).Name) } }