Skip to content

Commit 2ad9498

Browse files
committed
chore: bump go + golangci-lint
1 parent 6292953 commit 2ad9498

11 files changed

+11
-8
lines changed

.golangci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ linters:
4747
- varcheck # deprecated since v1.49.0
4848
- depguard # nothing to guard against yet
4949
- tagalign # hurts readability of kong tags
50+
- mnd
51+
- perfsprint
5052

5153
linters-settings:
5254
govet:
@@ -76,6 +78,7 @@ issues:
7678
- 'bad syntax for struct tag key'
7779
- 'bad syntax for struct tag pair'
7880
- 'result .* \(error\) is always nil'
81+
- 'Error return value of `fmt.Fprintln` is not checked'
7982

8083
exclude-rules:
8184
# Don't warn on unused parameters.
File renamed without changes.
File renamed without changes.

bin/go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.go-1.22.6.pkg
1+
.go-1.23.0.pkg

bin/gofmt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.go-1.22.6.pkg
1+
.go-1.23.0.pkg

bin/golangci-lint

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.golangci-lint-1.55.2.pkg
1+
.golangci-lint-1.60.1.pkg

context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ func checkXorDuplicatedAndAndMissing(paths []*Path) error {
10151015
errs = append(errs, err.Error())
10161016
}
10171017
if len(errs) > 0 {
1018-
return fmt.Errorf(strings.Join(errs, ", "))
1018+
return errors.New(strings.Join(errs, ", "))
10191019
}
10201020
return nil
10211021
}

help_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ func TestAutoGroup(t *testing.T) {
600600
if node, ok := parent.(*kong.Node); ok {
601601
return &kong.Group{
602602
Key: node.Name,
603-
Title: strings.Title(node.Name) + " flags:", //nolint
603+
Title: strings.Title(node.Name) + " flags:",
604604
}
605605
}
606606
return nil

kong_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ func TestMultilineMessage(t *testing.T) {
608608
w := &bytes.Buffer{}
609609
var cli struct{}
610610
p := mustNew(t, &cli, kong.Writers(w, w))
611-
p.Printf(test.text)
611+
p.Printf("%s", test.text)
612612
assert.Equal(t, test.want, w.String())
613613
})
614614
}

levenshtein.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func levenshtein(a, b string) int {
3131
return f[len(f)-1]
3232
}
3333

34-
func min(a, b int) int {
34+
func min(a, b int) int { //nolint:predeclared
3535
if a <= b {
3636
return a
3737
}

resolver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ func JSON(r io.Reader) (Resolver, error) {
6363
}
6464

6565
func snakeCase(name string) string {
66-
name = strings.Join(strings.Split(strings.Title(name), "-"), "") //nolint: staticcheck
66+
name = strings.Join(strings.Split(strings.Title(name), "-"), "")
6767
return strings.ToLower(name[:1]) + name[1:]
6868
}

0 commit comments

Comments
 (0)