Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# errcheck

errcheck is a program for checking for unchecked errors in Go code.
errcheck finds silently ignored errors in Go code.

![errcheck](https://github.com/kisielk/errcheck/workflows/errcheck/badge.svg)

For all callables that are not in the excluded list, all returned errors must
be either assigned to a variable or explicitly discarded by being assigned to `_`.

Please note that errcheck does not do any further analysis on assigned errors.

For example, it will not complain about this:

```go
err := foo()

// First error is discarded
err = bar()
if err != nil {
...
}
```

For such analysis and more, please see [staticcheck](https://staticcheck.dev/).

## Install

go install github.com/kisielk/errcheck@latest
Expand Down