Skip to content

Commit 148d21e

Browse files
committed
README: Clarify the purpose and limitations of the program.
1 parent e3eb51b commit 148d21e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
# errcheck
22

3-
errcheck is a program for checking for unchecked errors in Go code.
3+
errcheck finds silently ignored errors in Go code.
4+
5+
For all callables that are not in the excluded list, all returned errors must
6+
be either assigned to a variable or explicitly discarded by being assigned to `_`.
7+
8+
Please note that errcheck does not do any further analysis on assigned errors.
9+
10+
For example, it will not complain about this:
11+
12+
```go
13+
err = foo()
14+
15+
// First error is discarded
16+
err = bar()
17+
if err != nil {
18+
...
19+
}
20+
```
21+
22+
For such analysis and more, please see [staticcheck](https://staticcheck.dev/).
423

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

0 commit comments

Comments
 (0)