chore: bump go + golangci-lint
This commit is contained in:
@@ -47,6 +47,8 @@ linters:
|
||||
- varcheck # deprecated since v1.49.0
|
||||
- depguard # nothing to guard against yet
|
||||
- tagalign # hurts readability of kong tags
|
||||
- mnd
|
||||
- perfsprint
|
||||
|
||||
linters-settings:
|
||||
govet:
|
||||
@@ -76,6 +78,7 @@ issues:
|
||||
- 'bad syntax for struct tag key'
|
||||
- 'bad syntax for struct tag pair'
|
||||
- 'result .* \(error\) is always nil'
|
||||
- 'Error return value of `fmt.Fprintln` is not checked'
|
||||
|
||||
exclude-rules:
|
||||
# Don't warn on unused parameters.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.golangci-lint-1.55.2.pkg
|
||||
.golangci-lint-1.60.1.pkg
|
||||
+1
-1
@@ -1015,7 +1015,7 @@ func checkXorDuplicatedAndAndMissing(paths []*Path) error {
|
||||
errs = append(errs, err.Error())
|
||||
}
|
||||
if len(errs) > 0 {
|
||||
return fmt.Errorf(strings.Join(errs, ", "))
|
||||
return errors.New(strings.Join(errs, ", "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -600,7 +600,7 @@ func TestAutoGroup(t *testing.T) {
|
||||
if node, ok := parent.(*kong.Node); ok {
|
||||
return &kong.Group{
|
||||
Key: node.Name,
|
||||
Title: strings.Title(node.Name) + " flags:", //nolint
|
||||
Title: strings.Title(node.Name) + " flags:",
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
+1
-1
@@ -608,7 +608,7 @@ func TestMultilineMessage(t *testing.T) {
|
||||
w := &bytes.Buffer{}
|
||||
var cli struct{}
|
||||
p := mustNew(t, &cli, kong.Writers(w, w))
|
||||
p.Printf(test.text)
|
||||
p.Printf("%s", test.text)
|
||||
assert.Equal(t, test.want, w.String())
|
||||
})
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func levenshtein(a, b string) int {
|
||||
return f[len(f)-1]
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
func min(a, b int) int { //nolint:predeclared
|
||||
if a <= b {
|
||||
return a
|
||||
}
|
||||
|
||||
+1
-1
@@ -63,6 +63,6 @@ func JSON(r io.Reader) (Resolver, error) {
|
||||
}
|
||||
|
||||
func snakeCase(name string) string {
|
||||
name = strings.Join(strings.Split(strings.Title(name), "-"), "") //nolint: staticcheck
|
||||
name = strings.Join(strings.Split(strings.Title(name), "-"), "")
|
||||
return strings.ToLower(name[:1]) + name[1:]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user