enable more linters (#1043)

* enable revive linter

* enable gochecknoinits linter

* enable unconvert linter

* enable unparam linter

* enable asciicheck linter

* enable depguard linter

* enable nakedret linter

* enable megacheck linter

* enable nolintlint linter

* enable predeclared linter

* Update go.yml

* Update go.yml
This commit is contained in:
Matthieu MOREL
2021-12-21 09:30:08 +11:00
committed by GitHub
parent d8abcce633
commit 59752fb36d
20 changed files with 69 additions and 54 deletions
+2 -2
View File
@@ -203,10 +203,10 @@ func recursiveNodeEqual(lhs *yaml.Node, rhs *yaml.Node) bool {
func parseInt(numberString string) (string, int64, error) {
if strings.HasPrefix(numberString, "0x") ||
strings.HasPrefix(numberString, "0X") {
num, err := strconv.ParseInt(numberString[2:], 16, 64) // nolint
num, err := strconv.ParseInt(numberString[2:], 16, 64)
return "0x%X", num, err
}
num, err := strconv.ParseInt(numberString, 10, 64) // nolint
num, err := strconv.ParseInt(numberString, 10, 64)
return "%v", num, err
}