From 8fa956036acd9bf0c0c634f841afe0a6ad43dab7 Mon Sep 17 00:00:00 2001 From: Manu NALEPA Date: Wed, 24 Sep 2025 21:57:17 +0200 Subject: [PATCH] Update go.mod to v1.25.1. (#15740) * Updated go.mod to v1.25.1. Run `golangci-lint migrate` GolangCI lint: Add `noinlineerr`. Run `golangci-lint run --config=.golangci.yml`. `golangci`: Add `--new`. * `go.yml`: Added `fetch-depth: 0` to have something working with merge queue according to https://github.com/golangci/golangci-lint-action/issues/956 --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com> --- .github/actions/gomodtidy/Dockerfile | 2 +- .github/workflows/fuzz.yml | 4 +- .github/workflows/go.yml | 23 +++++----- .golangci.yml | 67 ++++++++++++++++------------ changelog/manu-go-1.25.1.md | 3 ++ go.mod | 2 +- 6 files changed, 57 insertions(+), 44 deletions(-) create mode 100644 changelog/manu-go-1.25.1.md diff --git a/.github/actions/gomodtidy/Dockerfile b/.github/actions/gomodtidy/Dockerfile index 118fe174c6..3aab97ebe0 100644 --- a/.github/actions/gomodtidy/Dockerfile +++ b/.github/actions/gomodtidy/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24-alpine +FROM golang:1.25.1-alpine COPY entrypoint.sh /entrypoint.sh diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index b547eec08e..fd9de7000c 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.23.5' + go-version: '1.25.1' - id: list uses: shogo82148/actions-go-fuzz/list@v0 with: @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.23.5' + go-version: '1.25.1' - uses: shogo82148/actions-go-fuzz/run@v0 with: packages: ${{ matrix.package }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 811e7a8d7a..0b75d9cf64 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -31,7 +31,7 @@ jobs: - name: Set up Go 1.24 uses: actions/setup-go@v4 with: - go-version: '1.24.0' + go-version: '1.25.1' - name: Run Gosec Security Scanner run: | # https://github.com/securego/gosec/issues/469 export PATH=$PATH:$(go env GOPATH)/bin @@ -44,27 +44,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - - name: Set up Go 1.24 - uses: actions/setup-go@v4 with: - go-version: '1.24.0' - id: go + fetch-depth: 0 + + - name: Set up Go 1.25.1 + uses: actions/setup-go@v5 + with: + go-version: '1.25.1' - name: Golangci-lint - uses: golangci/golangci-lint-action@v5 + uses: golangci/golangci-lint-action@v8 with: - version: v1.64.5 - args: --config=.golangci.yml --out-${NO_FUTURE}format colored-line-number + version: v2.4 + only-new-issues: true build: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.x + - name: Set up Go 1.25.1 uses: actions/setup-go@v4 with: - go-version: '1.24.0' + go-version: '1.25.1' id: go - name: Check out code into the Go module directory diff --git a/.golangci.yml b/.golangci.yml index d5606d1185..8c9264ef2d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,22 +1,9 @@ +version: "2" run: - timeout: 10m - go: '1.23.5' - -issues: - exclude-files: - - validator/web/site_data.go - - .*_test.go - exclude-dirs: - - proto - - tools/analyzers - + go: 1.23.5 linters: - enable-all: true + default: all disable: - # Deprecated linters: - - govet - - # Disabled for now: - asasalint - bodyclose - containedctx @@ -26,14 +13,13 @@ linters: - dogsled - dupl - durationcheck - - errname - err113 + - errname - exhaustive - exhaustruct - forbidigo - forcetypeassert - funlen - - gci - gochecknoglobals - gochecknoinits - goconst @@ -41,9 +27,9 @@ linters: - gocyclo - godot - godox - - gofumpt - gomoddirectives - gosec + - govet - inamedparam - interfacebloat - intrange @@ -58,6 +44,7 @@ linters: - nilnil - nlreturn - noctx + - noinlineerr - nolintlint - nonamedreturns - nosprintfhostport @@ -70,7 +57,6 @@ linters: - revive - spancheck - staticcheck - - stylecheck - tagalign - tagliatelle - thelper @@ -79,12 +65,35 @@ linters: - varnamelen - wrapcheck - wsl - -linters-settings: - gocognit: - # TODO: We should target for < 50 - min-complexity: 65 - -output: - print-issued-lines: true - sort-results: true + settings: + gocognit: + min-complexity: 65 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - validator/web/site_data.go + - .*_test.go + - proto + - tools/analyzers + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - validator/web/site_data.go + - .*_test.go + - proto + - tools/analyzers + - third_party$ + - builtin$ + - examples$ diff --git a/changelog/manu-go-1.25.1.md b/changelog/manu-go-1.25.1.md new file mode 100644 index 0000000000..776c60795d --- /dev/null +++ b/changelog/manu-go-1.25.1.md @@ -0,0 +1,3 @@ +### Changed + +- Updated go.mod to v1.25.1 \ No newline at end of file diff --git a/go.mod b/go.mod index aa04fea2ee..c364685dc5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/OffchainLabs/prysm/v6 -go 1.24.5 +go 1.25.1 require ( github.com/MariusVanDerWijden/FuzzyVM v0.0.0-20240516070431-7828990cad7d