Skip to content

Commit

Permalink
Bump golangci-lint from 1.55.2 to 1.59
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed Jun 10, 2024
1 parent 6054848 commit cec6fdf
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
25 changes: 13 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
run:
tests: true
timeout: 15m
sort-results: true
timeout: 5m
allow-parallel-runners: true
exclude-dir: testutil/testdata
skip-files:
- server/grpc/gogoreflection/fix_registration.go
- "fix_registration.go"
- ".*\\.pb\\.go$"
- ".*\\.pb\\.gw\\.go$"
- ".*\\.pulsar\\.go$"
- crypto/keys/secp256k1/internal/*
build-tags:
- ledger
- goleveldb
- test_ledger_mock

output:
sort-results: true

linters:
disable-all: true
enable:
Expand All @@ -42,6 +36,15 @@ linters:
- unused

issues:
exclude-dirs:
- "testdata$"
exclude-files:
- server/grpc/gogoreflection/fix_registration.go
- "fix_registration.go"
- ".*\\.pb\\.go$"
- ".*\\.pb\\.gw\\.go$"
- ".*\\.pulsar\\.go$"
- crypto/keys/secp256k1/internal/*
exclude-rules:
- text: "Use of weak random number generator"
linters:
Expand Down Expand Up @@ -156,8 +159,6 @@ linters-settings:
extra-rules: true
dogsled:
max-blank-identifiers: 6
maligned:
suggest-new: true
nolintlint:
allow-unused: false
require-explanation: false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ lint: golangci-lint
find . -name '*.go' -type f -not -path "*.git*" | xargs gofmt -d -s

golangci-lint:
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0

lint-fix: golangci-lint
golangci-lint run --fix --out-format=tab --issues-exit-code=0
Expand Down
1 change: 0 additions & 1 deletion crypto/keys/multisig/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const (
PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold"
)

// nolint
// Deprecated: Amino is being deprecated in the SDK. But even if you need to
// use Amino for some reason, please use `codec/legacy.Cdc` instead.
var AminoCdc = codec.NewLegacyAmino()
Expand Down
10 changes: 8 additions & 2 deletions x/gov/types/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,18 @@ func (status *ProposalStatus) Unmarshal(data []byte) error {

// Format implements the fmt.Formatter interface.
func (status ProposalStatus) Format(s fmt.State, verb rune) {
var err error

switch verb {
case 's':
s.Write([]byte(status.String()))
_, err = s.Write([]byte(status.String()))
default:
// TODO: Do this conversion more directly
s.Write([]byte(fmt.Sprintf("%v", byte(status))))
_, err = s.Write([]byte(fmt.Sprintf("%v", byte(status))))
}

if err != nil {
panic(err)
}
}

Expand Down
10 changes: 8 additions & 2 deletions x/gov/types/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,16 @@ func (vo *VoteOption) Unmarshal(data []byte) error {

// Format implements the fmt.Formatter interface.
func (vo VoteOption) Format(s fmt.State, verb rune) {
var err error

switch verb {
case 's':
s.Write([]byte(vo.String()))
_, err = s.Write([]byte(vo.String()))
default:
s.Write([]byte(fmt.Sprintf("%v", byte(vo))))
_, err = s.Write([]byte(fmt.Sprintf("%v", byte(vo))))
}

if err != nil {
panic(err)
}
}

0 comments on commit cec6fdf

Please sign in to comment.