Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update golangci-lint to version 1.61.0 #2154

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ linters-settings:
exhaustruct:
include: []

gosec:
excludes:
- G115 #TODO: remove after fixing https://github.com/securego/gosec/issues/1212

linters:
disable-all: true
enable:
Expand All @@ -75,7 +79,7 @@ linters:
- dogsled
- dupl
- errcheck
- exportloopref
- copyloopvar
- funlen
- gochecknoinits
- goconst
Expand Down Expand Up @@ -108,14 +112,12 @@ linters:

# don't enable:
# - asciicheck
# - scopelint
# - gochecknoglobals
# - gocognit
# - godot
# - godox
# - goerr113
# - err113
# - interfacer
# - maligned
# - nestif
# - prealloc
# - testpackage
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install-mockgen:
go install go.uber.org/mock/mockgen@latest

install-golangci-lint:
@which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1
@which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

lint: install-golangci-lint
golangci-lint run
Expand Down
1 change: 0 additions & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ func (n *Node) Run(ctx context.Context) {
}

for _, s := range n.services {
s := s
wg.Go(func() {
// Immediately acknowledge panicing services by shutting down the node
// Without the deffered cancel(), we would have to wait for user to hit Ctrl+C
Expand Down
2 changes: 0 additions & 2 deletions p2p/starknet/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package starknet

// TODO: remove this nolint when the issue is fixed https://github.com/daixiang0/gci/issues/209
//nolint:gci
import (
"context"
"errors"
Expand Down
2 changes: 0 additions & 2 deletions p2p/starknet/handlers.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//go:generate protoc --go_out=./ --proto_path=./ --go_opt=Mp2p/proto/transaction.proto=./spec --go_opt=Mp2p/proto/state.proto=./spec --go_opt=Mp2p/proto/snapshot.proto=./spec --go_opt=Mp2p/proto/receipt.proto=./spec --go_opt=Mp2p/proto/mempool.proto=./spec --go_opt=Mp2p/proto/event.proto=./spec --go_opt=Mp2p/proto/block.proto=./spec --go_opt=Mp2p/proto/common.proto=./spec p2p/proto/transaction.proto p2p/proto/state.proto p2p/proto/snapshot.proto p2p/proto/common.proto p2p/proto/block.proto p2p/proto/event.proto p2p/proto/receipt.proto
package starknet

// TODO: remove this nolint when the issue is fixed https://github.com/daixiang0/gci/issues/209
//nolint:gci
import (
"bytes"
"context"
Expand Down
1 change: 0 additions & 1 deletion utils/pipeline/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func TestPipeline(t *testing.T) {
var chs []<-chan string

for n := range nums {
n := n
strCh := make(chan string)
go func() {
defer close(strCh)
Expand Down