Skip to content

Commit

Permalink
feat: bump go, golangci-lint and some cleanup (#22)
Browse files Browse the repository at this point in the history
* feat: bump go to 1.22

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>

* feat: use static version of golangci-lint

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>

* fix: lint issue

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>

* chore: add test rule to Makefile

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>

---------

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton authored Apr 12, 2024
1 parent 722269a commit fa291b6
Show file tree
Hide file tree
Showing 10 changed files with 1,246 additions and 53 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22

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

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.57
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22

- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.22

- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ linters:
- 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
- unused # Checks Go code for unused constants, variables, functions and types

issues:
exclude-files:
- tools/tools.go

linters-settings:
gofmt:
simplify: true
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
golangci_lint := go run -modfile=./tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint

all: build

.PHONY: build
build:
@echo "Building supernova binary"
go build -o build/supernova ./cmd

test:
go test -v ./...

.PHONY: lint
lint:
golangci-lint run --config .golangci.yaml
$(golangci_lint) run --config .golangci.yaml
44 changes: 23 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
module github.com/gnolang/supernova

go 1.21

require github.com/peterbourgon/ff/v3 v3.4.0
go 1.22

require (
github.com/peterbourgon/ff/v3 v3.4.0
github.com/schollz/progressbar/v3 v3.14.2
github.com/stretchr/testify v1.9.0
)

require (
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/term v0.17.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c // indirect
github.com/btcsuite/btcd/btcutil v1.1.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cockroachdb/apd v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/badger/v3 v3.2103.4 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gnolang/cors v1.8.1 // indirect
github.com/gnolang/gno v0.0.0-20230330135006-28c1984fb1cd
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/flatbuffers v1.12.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.12.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.7.15 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/onsi/gomega v1.31.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.22.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit fa291b6

Please sign in to comment.