Merge PR #5192: golangcI-lint updates & set static version to 1.19

This commit is contained in:
Marko
2019-10-14 11:43:19 -04:00
committed by Alexander Bezobchuk
parent fbd551da98
commit 9f3789157e
35 changed files with 77 additions and 91 deletions
+5 -5
View File
@@ -10,14 +10,14 @@ const DefaultKeyringServiceName = "cosmos"
// Config is the structure that holds the SDK configuration parameters.
// This could be used to initialize certain configuration parameters for the SDK.
type Config struct {
mtx sync.RWMutex
sealed bool
bech32AddressPrefix map[string]string
coinType uint32
fullFundraiserPath string
keyringServiceName string
bech32AddressPrefix map[string]string
txEncoder TxEncoder
addressVerifier func([]byte) error
keyringServiceName string
mtx sync.RWMutex
coinType uint32
sealed bool
}
// cosmos-sdk wide global singleton
+1 -1
View File
@@ -91,7 +91,7 @@ func TestLogContext(t *testing.T) {
require.Equal(t, *logger.logs, []string{"debug", "info", "error"})
}
type dummy int64 //nolint: unused
type dummy int64 //nolint:unused
func (d dummy) Clone() interface{} {
return d
-2
View File
@@ -45,7 +45,6 @@ func precisionInt() *big.Int {
return new(big.Int).Set(precisionReuse)
}
// nolint - common values
func ZeroDec() Dec { return Dec{new(big.Int).Set(zeroInt)} }
func OneDec() Dec { return Dec{precisionInt()} }
func SmallestDec() Dec { return Dec{new(big.Int).Set(oneInt)} }
@@ -394,7 +393,6 @@ func (d Dec) String() string {
// |_____: / | $$$ |
// |________|
// nolint - go-cyclo
// Remove a Precision amount of rightmost digits and perform bankers rounding
// on the remainder (gaussian rounding) on the digits which have been removed.
//
+1 -1
View File
@@ -328,7 +328,7 @@ func AppendMsgToErr(msg string, err string) string {
}
// returns the index of the message in the ABCI Log
// nolint: deadcode unused
// nolint:deadcode,unused
func mustGetMsgIndex(abciLog string) int {
msgIdx := strings.Index(abciLog, "message\":\"")
if msgIdx == -1 {