errcheck icon indicating copy to clipboard operation
errcheck copied to clipboard

errcheck checks that you checked errors.

Results 28 errcheck issues
Sort by recently updated
recently updated
newest added

golang version: >1.17 The following error occurs when running errcheck: `error: failed to check packages: errors while loading package github.com/********-********/****************: [/Users/********/projects/go/src/github.com/********/********/********/********.go:line:col: MaxInt64 not declared by package math]` To reproduce: 1....

Should the doc have at least some example on how this will check ? What code will give error, what won't ?

documentation
help wanted

Using this program: ~~~go package main import "strconv" func main() { n, err := strconv.Atoi("99") if err != nil { panic(err) } println(n) _, err = strconv.Atoi("88") } ~~~ With...

Hello! ```yaml # .golangci.yml linters-settings: errcheck: exclude-functions: - recover ``` ```go $ cat example.go package main func main() { defer func() { recover() }() } ``` ``` $ golangci-lint run...

I have a feature request: It would be nice if the linter saw that I forgot to respect the protocol of the `Rows` `struct` and didn't call `rows.Err()` to check...

help wanted

HI, I want to contribute a feature to errcheck, that is "statement returned error variables must be checked in next statement". This is my commit https://github.com/lance6716/errcheck/commit/43c9b804f2fa62ecd9865c9f440552ecfcd07621 Now I want to...

Reference: https://github.com/golang/go/issues/38832

enhancement
help wanted

It would be nice to catch code such as: ``` var ( x, y int err error ) x, err = foo() y, err = a(x) return x, y ```...

enhancement
help wanted

We have code like ```go buffer := bytes.Buffer{} _, _ = buffer.WriteString("") ``` We always want to ignore these errors, so I want to add some `-exclude` or `-ignore` rules...

While writing a similar tool, I ended up spending some time pondering under what circumstances Go allows a value to be generated-but-not-consumed. And there aren't all that many; it's mostly...

enhancement
help wanted