Skip to content

Commit fa291b6

Browse files
authored
feat: bump go, golangci-lint and some cleanup (#22)
* feat: bump go to 1.22 Signed-off-by: gfanton <[email protected]> * feat: use static version of golangci-lint Signed-off-by: gfanton <[email protected]> * fix: lint issue Signed-off-by: gfanton <[email protected]> * chore: add test rule to Makefile Signed-off-by: gfanton <[email protected]> --------- Signed-off-by: gfanton <[email protected]>
1 parent 722269a commit fa291b6

File tree

10 files changed

+1246
-53
lines changed

10 files changed

+1246
-53
lines changed

.github/workflows/lint.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ jobs:
99
- name: Install Go
1010
uses: actions/setup-go@v5
1111
with:
12-
go-version: 1.21
12+
go-version: 1.22
1313

1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

1717
- name: Lint
1818
uses: golangci/golangci-lint-action@v4
19+
with:
20+
version: v1.57

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: Install Go
1010
uses: actions/setup-go@v5
1111
with:
12-
go-version: 1.21
12+
go-version: 1.22
1313

1414
- name: Checkout code
1515
uses: actions/checkout@v4
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.19.x
26+
go-version: 1.22
2727

2828
- name: Checkout code
2929
uses: actions/checkout@v4

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ linters:
3434
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13
3535
- unused # Checks Go code for unused constants, variables, functions and types
3636

37+
issues:
38+
exclude-files:
39+
- tools/tools.go
40+
3741
linters-settings:
3842
gofmt:
3943
simplify: true

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
golangci_lint := go run -modfile=./tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint
2+
13
all: build
24

35
.PHONY: build
46
build:
57
@echo "Building supernova binary"
68
go build -o build/supernova ./cmd
79

10+
test:
11+
go test -v ./...
12+
813
.PHONY: lint
914
lint:
10-
golangci-lint run --config .golangci.yaml
15+
$(golangci_lint) run --config .golangci.yaml

go.mod

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,59 @@
11
module github.com/gnolang/supernova
22

3-
go 1.21
4-
5-
require github.com/peterbourgon/ff/v3 v3.4.0
3+
go 1.22
64

75
require (
6+
github.com/peterbourgon/ff/v3 v3.4.0
87
github.com/schollz/progressbar/v3 v3.14.2
98
github.com/stretchr/testify v1.9.0
109
)
1110

12-
require (
13-
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
14-
github.com/pmezard/go-difflib v1.0.0 // indirect
15-
github.com/rivo/uniseg v0.4.7 // indirect
16-
golang.org/x/term v0.17.0 // indirect
17-
gopkg.in/yaml.v3 v3.0.1 // indirect
18-
)
19-
2011
require (
2112
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c // indirect
2213
github.com/btcsuite/btcd/btcutil v1.1.1 // indirect
2314
github.com/cespare/xxhash v1.1.0 // indirect
24-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
15+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2516
github.com/cockroachdb/apd v1.1.0 // indirect
2617
github.com/davecgh/go-spew v1.1.1 // indirect
2718
github.com/dgraph-io/badger/v3 v3.2103.4 // indirect
2819
github.com/dgraph-io/ristretto v0.1.1 // indirect
2920
github.com/dustin/go-humanize v1.0.0 // indirect
21+
github.com/fsnotify/fsnotify v1.5.4 // indirect
3022
github.com/gnolang/cors v1.8.1 // indirect
3123
github.com/gnolang/gno v0.0.0-20230330135006-28c1984fb1cd
3224
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
3325
github.com/gogo/protobuf v1.3.2 // indirect
3426
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
35-
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
36-
github.com/golang/protobuf v1.5.2 // indirect
27+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
28+
github.com/golang/protobuf v1.5.3 // indirect
3729
github.com/golang/snappy v0.0.3 // indirect
3830
github.com/google/flatbuffers v1.12.1 // indirect
31+
github.com/google/go-cmp v0.6.0 // indirect
3932
github.com/gorilla/websocket v1.5.0 // indirect
4033
github.com/jmhodges/levigo v1.0.0 // indirect
4134
github.com/klauspost/compress v1.12.3 // indirect
35+
github.com/kr/pretty v0.3.1 // indirect
36+
github.com/lib/pq v1.10.9 // indirect
4237
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
4338
github.com/linxGnu/grocksdb v1.7.15 // indirect
39+
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
40+
github.com/onsi/gomega v1.31.1 // indirect
4441
github.com/pelletier/go-toml v1.9.5 // indirect
4542
github.com/pkg/errors v0.9.1 // indirect
43+
github.com/pmezard/go-difflib v1.0.0 // indirect
44+
github.com/rivo/uniseg v0.4.7 // indirect
45+
github.com/rogpeppe/go-internal v1.12.0 // indirect
4646
github.com/syndtr/goleveldb v1.0.0 // indirect
4747
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
4848
go.etcd.io/bbolt v1.3.7 // indirect
49-
go.opencensus.io v0.22.5 // indirect
49+
go.opencensus.io v0.24.0 // indirect
5050
go.uber.org/multierr v1.10.0 // indirect
51-
golang.org/x/crypto v0.7.0 // indirect
52-
golang.org/x/mod v0.9.0 // indirect
53-
golang.org/x/net v0.8.0 // indirect
54-
golang.org/x/sys v0.17.0 // indirect
55-
golang.org/x/tools v0.6.0 // indirect
56-
google.golang.org/protobuf v1.27.1 // indirect
51+
golang.org/x/crypto v0.21.0 // indirect
52+
golang.org/x/mod v0.16.0 // indirect
53+
golang.org/x/net v0.22.0 // indirect
54+
golang.org/x/sys v0.18.0 // indirect
55+
golang.org/x/term v0.18.0 // indirect
56+
golang.org/x/tools v0.19.0 // indirect
57+
google.golang.org/protobuf v1.33.0 // indirect
58+
gopkg.in/yaml.v3 v3.0.1 // indirect
5759
)

0 commit comments

Comments
 (0)