From adf50c9e196fe1940ebdee0596cdf3f4893d0813 Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Fri, 23 May 2025 19:40:32 -0400 Subject: [PATCH 1/4] Upgrade go + staticcheck --- .github/workflows/checks.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 75f2eb7..d918c20 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: ^1.21 + go-version: ^1.24 id: go - name: Check out code into the Go module directory @@ -30,7 +30,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: ^1.21 + go-version: ^1.24 id: go - name: Check out code into the Go module directory @@ -40,7 +40,7 @@ jobs: run: go install mvdan.cc/gofumpt@v0.4.0 - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.2 + run: go install honnef.co/go/tools/cmd/staticcheck@v0.6.1 - name: Install golangci-lint run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0 From 2725be85d4ae0ad4af66aa8b25fc1c42b4989dbb Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Fri, 23 May 2025 19:50:47 -0400 Subject: [PATCH 2/4] Fix lint issues caused by go upgrade --- cmd/httpserver/main.go | 2 +- httpserver/server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/httpserver/main.go b/cmd/httpserver/main.go index b46b5d8..dcd421f 100644 --- a/cmd/httpserver/main.go +++ b/cmd/httpserver/main.go @@ -10,7 +10,7 @@ import ( "github.com/flashbots/ssh-pubkey-server/common" "github.com/flashbots/ssh-pubkey-server/httpserver" "github.com/google/uuid" - "github.com/urfave/cli/v2" // imports as package "cli" + cli "github.com/urfave/cli/v2" ) var flags []cli.Flag = []cli.Flag{ diff --git a/httpserver/server.go b/httpserver/server.go index 6af944a..d181448 100644 --- a/httpserver/server.go +++ b/httpserver/server.go @@ -12,7 +12,7 @@ import ( "github.com/flashbots/go-utils/httplogger" "github.com/flashbots/ssh-pubkey-server/common" "github.com/flashbots/ssh-pubkey-server/metrics" - "github.com/go-chi/chi/v5" + chi "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "go.uber.org/atomic" ) From d5a26b18dd82fb723f3ca80b25be1ea81780a6c0 Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Fri, 23 May 2025 19:56:08 -0400 Subject: [PATCH 3/4] Upgrade golangci --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d918c20..b0ce79d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -43,7 +43,7 @@ jobs: run: go install honnef.co/go/tools/cmd/staticcheck@v0.6.1 - name: Install golangci-lint - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0 + run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 - name: Install NilAway run: go install go.uber.org/nilaway/cmd/nilaway@latest From 783ad2fedeadfcc56bf65906f208f8c97b265dee Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Fri, 23 May 2025 20:01:05 -0400 Subject: [PATCH 4/4] Remove deprecated golangci lint rules --- .golangci.yaml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index e1e6a2e..185d64a 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -10,23 +10,21 @@ linters: - gocritic - godot - godox - - gomnd - lll + - mnd - nestif - nilnil - nlreturn - noctx - nonamedreturns - - nosnakecase - paralleltest - revive - testpackage + - tenv - unparam - varnamelen - wrapcheck - wsl - - deadcode - - varcheck - exhaustruct - depguard @@ -36,19 +34,8 @@ linters: - contextcheck - rowserrcheck - sqlclosecheck - - structcheck - wastedassign - # - # Disabled because deprecated: - # - - exhaustivestruct - - golint - - ifshort - - interfacer - - maligned - - scopelint - linters-settings: # # The G108 rule throws a false positive. We're not actually vulnerable. If