Skip to content

Commit

Permalink
Update golangci-lint to v1.60.1 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkushinDaniil authored Aug 14, 2024
1 parent 4058e4f commit 2a420ea
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
version: v1.60.1
proto:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ linters-settings:
- unnamedResult
goimports:
local-prefixes: github.com/golangci/golangci-lint
gomnd:
mnd:
# don't include the "operation" and "assign"
checks:
- argument
Expand Down Expand Up @@ -71,7 +71,7 @@ linters:
- goconst
- gocritic
- gofumpt
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
Expand Down Expand Up @@ -115,7 +115,7 @@ issues:
exclude-rules:
- path: (testutils)|(_test\.go)
linters:
- gomnd
- mnd
- funlen
- lll
- gosec
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ e2e:

.PHONY: install-golangci-lint
install-golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1

.PHONY: lint
lint:
Expand Down
4 changes: 2 additions & 2 deletions comet/comet.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (s *SubscriberAPI) Subscribe(ctx *jsonrpctypes.Context, query string) (*rpc
// From CometBFT:
// The timeout is the maximum time we wait to subscribe for an event.
// Must be less than the http server's write timeout.
subCtx, cancel := context.WithTimeout(ctx.Context(), 5*time.Second) //nolint:gomnd
subCtx, cancel := context.WithTimeout(ctx.Context(), 5*time.Second) //nolint:mnd
defer cancel()

sub, err := s.eventBus.Subscribe(subCtx, ctx.RemoteAddr(), parsedQuery)
Expand All @@ -224,7 +224,7 @@ func (s *SubscriberAPI) Subscribe(ctx *jsonrpctypes.Context, query string) (*rpc
Events: msg.Events(),
}
resp := jsonrpctypes.NewRPCSuccessResponse(subscriptionID, resultEvent)
writeCtx, cancel := context.WithTimeout(ctx.Context(), 10*time.Second) //nolint:gomnd
writeCtx, cancel := context.WithTimeout(ctx.Context(), 10*time.Second) //nolint:mnd
if writeErr := ctx.WSConn.WriteRPCResponse(writeCtx, resp); writeErr != nil {
cancel()
err := fmt.Errorf("subscription was canceled (reason: %v)", writeErr)
Expand Down
2 changes: 1 addition & 1 deletion monomerdb/localdb/localdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func get(g getter, key []byte) (_ []byte, _ io.Closer, err error) {
}

func marshalUint64(x uint64) []byte {
bytes := make([]byte, 8) //nolint:gomnd
bytes := make([]byte, 8) //nolint:mnd
endian.PutUint64(bytes, x)
return bytes
}
Expand Down

0 comments on commit 2a420ea

Please sign in to comment.