diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index b58ba73ec85f..bd97056d0421 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -15,7 +15,7 @@ jobs: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' HUGO_VERSION: 0.148.1 CGO_ENABLED: 0 steps: diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index ec76926ad802..a6cbbca6ffc1 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -9,7 +9,7 @@ env: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' jobs: update-gha-assets: diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index e7dcc4232353..6d2fe2be3acb 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -10,7 +10,7 @@ env: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' jobs: # Check if there is any dirty change for go mod tidy diff --git a/.github/workflows/pr-documentation.yml b/.github/workflows/pr-documentation.yml index bb6daf0cef54..53d9dccfe019 100644 --- a/.github/workflows/pr-documentation.yml +++ b/.github/workflows/pr-documentation.yml @@ -13,7 +13,7 @@ jobs: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' HUGO_VERSION: 0.148.1 CGO_ENABLED: 0 diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 52afdf9f9c59..bc29e7f617d3 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -10,7 +10,7 @@ env: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' jobs: # Check if there is any dirty change for go mod tidy @@ -39,7 +39,9 @@ jobs: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - go-version: ${{ env.GO_VERSION }} + # TODO(ldez) must be changed after the first release of golangci-lint with go1.25 + # go-version: ${{ env.GO_VERSION }} + go-version: '1.25' - name: lint uses: golangci/golangci-lint-action@v9.2.0 with: @@ -75,8 +77,8 @@ jobs: - ubuntu-latest - ubuntu-24.04-arm golang: - - '1.24' - '1.25' + - '1.26.0-rc.1' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c7306698668..4f98d981c67a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: # ex: # - 1.18beta1 -> 1.18.0-beta.1 # - 1.18rc1 -> 1.18.0-rc.1 - GO_VERSION: '1.25' + GO_VERSION: '1.26.0-rc.1' CHOCOLATEY_VERSION: 2.2.0 steps: # temporary workaround for an error in free disk space action diff --git a/build/buildx-alpine.Dockerfile b/build/buildx-alpine.Dockerfile index 61f9d7fa96aa..6fa00e4416af 100644 --- a/build/buildx-alpine.Dockerfile +++ b/build/buildx-alpine.Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM golang:1.25-alpine +FROM golang:1.26-alpine ARG TARGETPLATFORM diff --git a/build/buildx.Dockerfile b/build/buildx.Dockerfile index 9f626b579c21..9a3380525a3b 100644 --- a/build/buildx.Dockerfile +++ b/build/buildx.Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM golang:1.25 +FROM golang:1.26 ARG TARGETPLATFORM diff --git a/go.mod b/go.mod index 8e7ab6dfa6fd..134fe5713778 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,11 @@ module github.com/golangci/golangci-lint/v2 -go 1.24.0 +go 1.25.0 + +ignore ( + ./docs + ./jsonschema +) require ( 4d63.com/gocheckcompilerdirectives v1.3.0 @@ -135,7 +140,6 @@ require ( go-simpler.org/sloglint v0.11.1 go.augendre.info/arangolint v0.3.1 go.augendre.info/fatcontext v0.9.0 - go.uber.org/automaxprocs v1.6.0 go.yaml.in/yaml/v3 v3.0.4 golang.org/x/mod v0.31.0 golang.org/x/sync v0.19.0 diff --git a/go.sum b/go.sum index 8ff976dca3e3..3464eb9cb820 100644 --- a/go.sum +++ b/go.sum @@ -473,8 +473,6 @@ github.com/polyfloyd/go-errorlint v1.8.0 h1:DL4RestQqRLr8U4LygLw8g2DX6RN1eBJOpa2 github.com/polyfloyd/go-errorlint v1.8.0/go.mod h1:G2W0Q5roxbLCt0ZQbdoxQxXktTjwNyDbEaj3n7jvl4s= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -643,8 +641,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= diff --git a/pkg/commands/run.go b/pkg/commands/run.go index 93efa6d9cd04..a9a3495aae9e 100644 --- a/pkg/commands/run.go +++ b/pkg/commands/run.go @@ -25,7 +25,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" - "go.uber.org/automaxprocs/maxprocs" "go.yaml.in/yaml/v3" "golang.org/x/mod/sumdb/dirhash" @@ -160,16 +159,8 @@ func (c *runCommand) persistentPreRunE(cmd *cobra.Command, args []string) error return fmt.Errorf("can't load config: %w", err) } - if c.cfg.Run.Concurrency == 0 { - // `runtime.GOMAXPROCS` defaults to the value of `runtime.NumCPU`. - backup := runtime.GOMAXPROCS(0) - - // Automatically set GOMAXPROCS to match Linux container CPU quota. - _, err := maxprocs.Set(maxprocs.Logger(c.log.Infof)) - if err != nil { - runtime.GOMAXPROCS(backup) - } - } else { + // https://go.dev/doc/go1.25#container-aware-gomaxprocs + if c.cfg.Run.Concurrency != 0 { runtime.GOMAXPROCS(c.cfg.Run.Concurrency) } diff --git a/pkg/goformatters/gci/internal/section/standard_list.go b/pkg/goformatters/gci/internal/section/standard_list.go index f84eb0f33f59..a7787409e479 100644 --- a/pkg/goformatters/gci/internal/section/standard_list.go +++ b/pkg/goformatters/gci/internal/section/standard_list.go @@ -1,6 +1,6 @@ package section -// Code generated based on go1.25.0 X:boringcrypto,arenas,synctest,jsonv2. DO NOT EDIT. +// Code generated based on go1.26.0 X:boringcrypto,arenas,jsonv2,runtimesecret. DO NOT EDIT. var standardPackages = map[string]struct{}{ "archive/tar": {}, @@ -31,8 +31,10 @@ var standardPackages = map[string]struct{}{ "crypto/fips140": {}, "crypto/hkdf": {}, "crypto/hmac": {}, + "crypto/hpke": {}, "crypto/md5": {}, "crypto/mlkem": {}, + "crypto/mlkem/mlkemtest": {}, "crypto/pbkdf2": {}, "crypto/rand": {}, "crypto/rc4": {}, @@ -154,6 +156,7 @@ var standardPackages = map[string]struct{}{ "runtime/metrics": {}, "runtime/pprof": {}, "runtime/race": {}, + "runtime/secret": {}, "runtime/trace": {}, "slices": {}, "sort": {}, @@ -165,6 +168,7 @@ var standardPackages = map[string]struct{}{ "syscall": {}, "syscall/js": {}, "testing": {}, + "testing/cryptotest": {}, "testing/fstest": {}, "testing/iotest": {}, "testing/quick": {}, diff --git a/pkg/golinters/arangolint/testdata/go.mod b/pkg/golinters/arangolint/testdata/go.mod index 8af2dc2359ab..8505e438e01a 100644 --- a/pkg/golinters/arangolint/testdata/go.mod +++ b/pkg/golinters/arangolint/testdata/go.mod @@ -1,6 +1,6 @@ module arangolint -go 1.24.0 +go 1.25.0 require github.com/arangodb/go-driver/v2 v2.1.5 diff --git a/pkg/golinters/exptostd/testdata/go.mod b/pkg/golinters/exptostd/testdata/go.mod index 6553e085f3ba..a0253370e0c0 100644 --- a/pkg/golinters/exptostd/testdata/go.mod +++ b/pkg/golinters/exptostd/testdata/go.mod @@ -1,5 +1,5 @@ module exptostd -go 1.24.0 +go 1.25.0 require golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 diff --git a/pkg/golinters/ginkgolinter/testdata/go.mod b/pkg/golinters/ginkgolinter/testdata/go.mod index e14166334366..7fa930013d3a 100644 --- a/pkg/golinters/ginkgolinter/testdata/go.mod +++ b/pkg/golinters/ginkgolinter/testdata/go.mod @@ -1,6 +1,6 @@ module ginkgolinter -go 1.24.0 +go 1.25.0 require ( github.com/onsi/ginkgo/v2 v2.27.2 diff --git a/pkg/golinters/gomodguard/testdata/go.mod b/pkg/golinters/gomodguard/testdata/go.mod index 5ab7ab11f1eb..c228ef7292fd 100644 --- a/pkg/golinters/gomodguard/testdata/go.mod +++ b/pkg/golinters/gomodguard/testdata/go.mod @@ -1,6 +1,6 @@ module gomodguard -go 1.24.0 +go 1.25.0 require ( golang.org/x/mod v0.24.0 diff --git a/pkg/golinters/loggercheck/testdata/go.mod b/pkg/golinters/loggercheck/testdata/go.mod index 19b941401978..5544a0b0963f 100644 --- a/pkg/golinters/loggercheck/testdata/go.mod +++ b/pkg/golinters/loggercheck/testdata/go.mod @@ -1,6 +1,6 @@ module loggercheck -go 1.24.0 +go 1.25.0 require ( github.com/go-kit/log v0.2.1 diff --git a/pkg/golinters/protogetter/testdata/go.mod b/pkg/golinters/protogetter/testdata/go.mod index 6729ba1e27d6..32836618ff57 100644 --- a/pkg/golinters/protogetter/testdata/go.mod +++ b/pkg/golinters/protogetter/testdata/go.mod @@ -1,6 +1,6 @@ module protogetter -go 1.24.0 +go 1.25.0 require ( google.golang.org/grpc v1.76.0 diff --git a/pkg/golinters/spancheck/testdata/go.mod b/pkg/golinters/spancheck/testdata/go.mod index 5176b7a35ec3..59e32b97921a 100644 --- a/pkg/golinters/spancheck/testdata/go.mod +++ b/pkg/golinters/spancheck/testdata/go.mod @@ -1,6 +1,6 @@ module spancheck -go 1.24.0 +go 1.25.0 require ( go.opentelemetry.io/otel v1.38.0 diff --git a/pkg/golinters/zerologlint/testdata/go.mod b/pkg/golinters/zerologlint/testdata/go.mod index 59b4c0379194..f87ca78e64db 100644 --- a/pkg/golinters/zerologlint/testdata/go.mod +++ b/pkg/golinters/zerologlint/testdata/go.mod @@ -1,6 +1,6 @@ module zerologlint -go 1.24.0 +go 1.25.0 require github.com/rs/zerolog v1.34.0