Closed
Description
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:
- embedded errcheck linter errors are not the same as with running standalone errcheck #1194
- Attempt at updating the fork: Sync with main repo errcheck#4