Skip to content

Commit b65912b

Browse files
authored
build(deps): bump github.com/gostaticanalysis/nilerr from 0.1.1 to a fork (#6087)
1 parent 3ff4d3b commit b65912b

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ require (
5555
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d
5656
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95
5757
github.com/golangci/misspell v0.7.0
58+
github.com/golangci/nilerr v0.0.0-20250918000102-015671e622fe
5859
github.com/golangci/plugin-module-register v0.1.2
5960
github.com/golangci/revgrep v0.8.0
6061
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e
6162
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e
6263
github.com/gordonklaus/ineffassign v0.2.0
6364
github.com/gostaticanalysis/forcetypeassert v0.2.0
64-
github.com/gostaticanalysis/nilerr v0.1.1
6565
github.com/hashicorp/go-version v1.7.0
6666
github.com/jgautheron/goconst v1.8.2
6767
github.com/jingyugao/rowserrcheck v1.1.1
@@ -218,7 +218,7 @@ require (
218218
go.uber.org/zap v1.27.0 // indirect
219219
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
220220
golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 // indirect
221-
golang.org/x/text v0.28.0 // indirect
221+
golang.org/x/text v0.29.0 // indirect
222222
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
223223
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
224224
google.golang.org/protobuf v1.36.6 // indirect

go.sum

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/nilerr/nilerr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package nilerr
22

33
import (
4-
"github.com/gostaticanalysis/nilerr"
4+
"github.com/golangci/nilerr"
55

66
"github.com/golangci/golangci-lint/v2/pkg/goanalysis"
77
)

pkg/golinters/nilerr/testdata/nilerr.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,29 @@ func nilErr3() error {
3333
func nilErrDo() error {
3434
return os.ErrNotExist
3535
}
36+
37+
func l() error {
38+
aChan := make(chan error, 1)
39+
bChan := make(chan error, 1)
40+
41+
var aErr error
42+
var bErr error
43+
44+
for i := 0; i < 2; i++ {
45+
select {
46+
case err := <-aChan:
47+
aErr = err
48+
case err := <-bChan:
49+
bErr = err
50+
}
51+
}
52+
53+
if aErr != nil {
54+
return nil // want `error is not nil \(lines \[41 45\]\) but it returns nil`
55+
}
56+
if bErr != nil {
57+
return nil // want `error is not nil \(lines \[42 45\]\) but it returns nil`
58+
}
59+
60+
return nil
61+
}

0 commit comments

Comments
 (0)