nilerr icon indicating copy to clipboard operation
nilerr copied to clipboard

Analyzer: nilerr checks returning nil when err is not nil

Results 9 nilerr issues
Sort by recently updated
recently updated
newest added

nilerr sometimes fails to find `lint:ignore` comments. This is because nilerr checks if this comment exists by `comment.Maps.IgnoreLine()`, which does not work well with multiple files. For example, nilerr mistakenly...

When nilerr was compiled by a recent Go compiler, it fails with the following error. This issue could be fixed by updating golang.org/x/tools version. nilerr: internal error: package "fmt" without...

Reproduced with golangci-lint version 1.45.2 built from 8bdc4d3 on 2022-03-24T11:49:36Z Running lint shows this warning: ``` error is not nil (line 51) but it returns nil (nilerr) ``` on a...

Would you make a new release with gostaticanalysis/comment v1.4.2? https://github.com/gostaticanalysis/comment/pull/16 is very helpful.

We have been using nilerr happily for a long time. Thank you for maintaining this! Today, we upgraded Go version from 1.16 to 1.17 in https://github.com/cybozu-go/moco . Unfortunately, nilerr built...

``` $ git clone --quiet https://github.com/miniflux/v2 $ cd v2 $ go install github.com/gostaticanalysis/nilerr/cmd/nilerr@latest $ ~/go/bin/nilerr ./... nilerr: internal error: package "time" without types was imported from "miniflux.app/v2/internal/timezone" [1] $ ```

Hi 🙂 Please, bump `golang.org/x/tools` to v0.7.0 (as minimum) and make new tag in your repo. It's important to be consistent with new Go 1.20 **golangci-lint.** Related to https://github.com/golangci/golangci-lint/issues/3086 Thanks!...

It would be great if the tool could also check cases where errors are wrapped using `defer`, such as with [golang.org/x/pkgsite/internal/derrors.Wrap](https://pkg.go.dev/golang.org/x/pkgsite/internal/derrors#Wrap). ```go func wrap(errp *error) {} func f() (err error)...