Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Nov 10, 2022
1 parent a9f3751 commit 92112b8
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 31 deletions.
2 changes: 2 additions & 0 deletions client/pruning/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const FlagAppDBBackend = "app-db-backend"

// PruningCmd prunes the sdk root multi store history versions based on the pruning options
// specified by command flags.
//
//nolint:golint
func PruningCmd(appCreator servertypes.AppCreator) *cobra.Command {
cmd := &cobra.Command{
Use: "prune",
Expand Down
8 changes: 4 additions & 4 deletions codec/types/any.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
sdkerrors "github.com/line/lbm-sdk/types/errors"
)

//nolint:golint
type Any struct {
// A URL/resource name that uniquely identifies the type of the serialized
// protocol buffer message. This string must contain at least
Expand Down Expand Up @@ -41,11 +42,10 @@ type Any struct {
// Must be a valid serialized protocol buffer of the above specified type.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`

// If you change XXX_ to XXX, an error occurs in the part referring to google/protobuf/any.proto, so add the nolint flag.
XXX_NoUnkeyedLiteral struct{} `json:"-"`

XXX_unrecognized []byte `json:"-"`

XXX_sizecache int32 `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`

cachedValue interface{}

Expand Down
14 changes: 0 additions & 14 deletions store/iavl/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,17 +421,3 @@ type iavlIterator struct {
}

var _ types.Iterator = (*iavlIterator)(nil)

// newIAVLIterator will create a new iavlIterator.
// CONTRACT: Caller must release the iavlIterator, as each one creates a new
// goroutine.
func newIAVLIterator(tree *iavl.ImmutableTree, start, end []byte, ascending bool) *iavlIterator { //nolint:unused
iterator, err := tree.Iterator(start, end, ascending)
if err != nil {
panic(err)
}
iter := &iavlIterator{
Iterator: iterator,
}
return iter
}
2 changes: 1 addition & 1 deletion types/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const UndefinedCodespace = "undefined"

var (
// errInternal should never be exposed, but we reserve this code for non-specified errors
errInternal = Register(UndefinedCodespace, 1, "internal") //nolint:unused
errInternal = Register(UndefinedCodespace, 1, "internal") //nolint:deadcode,unused,varcheck

// ErrTxDecode is returned if we cannot parse a transaction
ErrTxDecode = Register(RootCodespace, 2, "tx parse error")
Expand Down
2 changes: 1 addition & 1 deletion types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

var (
// This is set at compile time. Could be cleveldb, defaults is goleveldb.
// DBBackend is set at compile time. Could be cleveldb, defaults is goleveldb.
DBBackend = ""
backend = dbm.GoLevelDBBackend
)
Expand Down
20 changes: 10 additions & 10 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
// At build time, the variables Name, Version, Commit, and BuildTags
// can be passed as build flags as shown in the following example:
//
// go build -X github.com/line/lbm-sdk/version.Name=sim \
// -X github.com/line/lbm-sdk/version.AppName=simd \
// -X github.com/line/lbm-sdk/version.Version=1.0 \
// -X github.com/line/lbm-sdk/version.Commit=f0f7b7dab7e36c20b757cebce0e8f4fc5b95de60 \
// -X "github.com/line/lbm-sdk/version.BuildTags=linux darwin amd64"
// go build -X github.com/line/lbm-sdk/version.Name=sim \
// -X github.com/line/lbm-sdk/version.AppName=simd \
// -X github.com/line/lbm-sdk/version.Version=1.0 \
// -X github.com/line/lbm-sdk/version.Commit=f0f7b7dab7e36c20b757cebce0e8f4fc5b95de60 \
// -X "github.com/line/lbm-sdk/version.BuildTags=linux darwin amd64"
package version

import (
Expand All @@ -24,15 +24,15 @@ import (
)

var (
// application's name
// Name is application's name
Name = ""
// application binary name
// AppName is application binary name
AppName = "<appd>"
// application's version string
// Version is application's version string
Version = ""
// commit
// Commit is commit
Commit = ""
// build tags
// BuildTags is build tags
BuildTags = ""
)

Expand Down
2 changes: 1 addition & 1 deletion x/auth/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
// AddressStoreKeyPrefix prefix for account-by-address store
AddressStoreKeyPrefix = []byte{0x01}

// param key for global account number
// GlobalAccountNumberKey is param key for global account number
GlobalAccountNumberKey = []byte("globalAccountNumber")
)

Expand Down
1 change: 1 addition & 0 deletions x/ibc/testing/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const (
LongString = "LoremipsumdolorsitameconsecteturadipiscingeliseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliquUtenimadminimveniamquisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequDuisauteiruredolorinreprehenderitinvoluptateelitsseillumoloreufugiatnullaariaturEcepteurintoccaectupidatatonroidentuntnulpauifficiaeseruntmollitanimidestlaborum"
)

//nolint:golint
var (
DefaultOpenInitVersion *connectiontypes.Version

Expand Down
1 change: 1 addition & 0 deletions x/staking/legacy/v040/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
RouterKey = ModuleName
)

//nolint:golint
var (
// Keys for store prefixes
// Last* values are constant during a block.
Expand Down
1 change: 1 addition & 0 deletions x/staking/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
RouterKey = ModuleName
)

//nolint:golint
var (
// Keys for store prefixes
// Last* values are constant during a block.
Expand Down

0 comments on commit 92112b8

Please sign in to comment.