Skip to content

Commit 5d242cc

Browse files
authored
Fix CI (#4)
* Upgrade go + staticcheck * Fix lint issues caused by go upgrade * Upgrade golangci * Remove deprecated golangci lint rules
1 parent bb2f187 commit 5d242cc

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

.github/workflows/checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v3
1616
with:
17-
go-version: ^1.21
17+
go-version: ^1.24
1818
id: go
1919

2020
- name: Check out code into the Go module directory
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Go
3131
uses: actions/setup-go@v3
3232
with:
33-
go-version: ^1.21
33+
go-version: ^1.24
3434
id: go
3535

3636
- name: Check out code into the Go module directory
@@ -40,10 +40,10 @@ jobs:
4040
run: go install mvdan.cc/gofumpt@v0.4.0
4141

4242
- name: Install staticcheck
43-
run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.2
43+
run: go install honnef.co/go/tools/cmd/staticcheck@v0.6.1
4444

4545
- name: Install golangci-lint
46-
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
46+
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8
4747

4848
- name: Install NilAway
4949
run: go install go.uber.org/nilaway/cmd/nilaway@latest

.golangci.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ linters:
1010
- gocritic
1111
- godot
1212
- godox
13-
- gomnd
1413
- lll
14+
- mnd
1515
- nestif
1616
- nilnil
1717
- nlreturn
1818
- noctx
1919
- nonamedreturns
20-
- nosnakecase
2120
- paralleltest
2221
- revive
2322
- testpackage
23+
- tenv
2424
- unparam
2525
- varnamelen
2626
- wrapcheck
2727
- wsl
28-
- deadcode
29-
- varcheck
3028
- exhaustruct
3129
- depguard
3230

@@ -36,19 +34,8 @@ linters:
3634
- contextcheck
3735
- rowserrcheck
3836
- sqlclosecheck
39-
- structcheck
4037
- wastedassign
4138

42-
#
43-
# Disabled because deprecated:
44-
#
45-
- exhaustivestruct
46-
- golint
47-
- ifshort
48-
- interfacer
49-
- maligned
50-
- scopelint
51-
5239
linters-settings:
5340
#
5441
# The G108 rule throws a false positive. We're not actually vulnerable. If

cmd/httpserver/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/flashbots/ssh-pubkey-server/common"
1111
"github.com/flashbots/ssh-pubkey-server/httpserver"
1212
"github.com/google/uuid"
13-
"github.com/urfave/cli/v2" // imports as package "cli"
13+
cli "github.com/urfave/cli/v2"
1414
)
1515

1616
var flags []cli.Flag = []cli.Flag{

httpserver/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/flashbots/go-utils/httplogger"
1313
"github.com/flashbots/ssh-pubkey-server/common"
1414
"github.com/flashbots/ssh-pubkey-server/metrics"
15-
"github.com/go-chi/chi/v5"
15+
chi "github.com/go-chi/chi/v5"
1616
"github.com/go-chi/chi/v5/middleware"
1717
"go.uber.org/atomic"
1818
)

0 commit comments

Comments
 (0)