It looks like the forked errcheck package (https://github.com/golangci/errcheck) is two years behind its current upstream (https://github.com/kisielk/errcheck). There are unfortunately some custom commits, so a trivial sync is not possible. What would it take to update it?
Is it possible to upstream some changes and avoid the use of a fork to ensure easy upgrades? (@kisielk @jirfag ?)
I ran into a false-positive errcheck warning with the following code:
package main
import (
"crypto/sha256"
"fmt"
)
func main() {
h := sha256.New()
h.Write([]byte("food"))
fmt.Println(h.Sum(nil))
}
Using the golangci/golangci-lint:v1.27.0 Docker image it outputs:
main.go:10:9: Error return value of `h.Write` is not checked (errcheck)
h.Write([]byte("food"))
^
This issue has been solved upstream two years ago via kisielk/errcheck#137.
Related issues:
It looks like the forked errcheck package (https://github.com/golangci/errcheck) is two years behind its current upstream (https://github.com/kisielk/errcheck). There are unfortunately some custom commits, so a trivial sync is not possible. What would it take to update it?
Is it possible to upstream some changes and avoid the use of a fork to ensure easy upgrades? (@kisielk @jirfag ?)
I ran into a false-positive
errcheckwarning with the following code:Using the
golangci/golangci-lint:v1.27.0Docker image it outputs:This issue has been solved upstream two years ago via kisielk/errcheck#137.
Related issues: