errcheck
brew install errcheck
v1.20.0
MIT
Finds silently ignored errors in Go code
13
30-day installs · #7817
43
90-day · #7733
161
365-day · #7901
2.5k
★ GitHub stars · updated 3mo ago
Build dependencies
GitHub topics
errcheck
error
go
linter
Links
- https://github.com/kisielk/errcheck
- GitHub: kisielk/errcheck
- Brew formula source: Formula/e/errcheck.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"go"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Finds silently ignored errors in Go code",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:37:23+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "errcheck",
"github_default_branch": "master",
"github_last_commit_at": "2026-05-12T20:50:18Z",
"github_readme_excerpt": "# errcheck\n\nerrcheck finds silently ignored errors in Go code.\n\n\n\nFor all callables that are not in the excluded list, all returned errors must\nbe either assigned to a variable or explicitly discarded by being assigned to `_`.\n\nPlease note that errcheck does not do any further analysis on assigned errors.\n\nFor example, it will not complain about this:\n\n```go\nerr := foo()\n\n// First error is discarded\nerr = bar()\nif err != nil {\n ...\n}\n```\n\nFor such analysis and more, please see [staticcheck](https://staticcheck.dev/).\n\n## Install\n\n go install github.com/kisielk/errcheck@latest\n\nerrcheck requires Go 1.25 or newer.\n\n## Use\n\nFor basic usage, just give the package path of interest as the first argument:\n\n errcheck github.com/kisielk/errcheck/testdata\n\nTo check all packages beneath the current directory:\n\n errcheck ./...\n\nOr check all packages in your `$GOPATH` and `$GOROOT`:\n\n errcheck all\n\nerrcheck also recognizes the following command-line options:\n\nThe `-tags` flag takes a space-separated list of build tags, just like `go\nbuild`. If you are using any custom build tags in your code base, you may need\nto specify the relevant tags here.\n\nThe `-asserts` flag enables checking for ignored type assertion results. It\ntakes no arguments.\n\nThe `-blank` flag enables checking for assignments of errors to the\nblank identifier. It takes no arguments.\n\nThe `-abspath` flag prints the absolute paths to files with unchecked errors.\n\nThe `-mod` flag sets the module download mode to use: `readonly` or `vendor`.\n\n### go/analysis\n\nThe package provides `Analyzer` instance that can be used with\n[go/analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis) API.\n\nCurrently supported flags are `blank`, `assert`, `exclude`, and `excludeonly`.\nJust as the API itself, the analyzer is experimental and may change in the\nfuture.\n\n## Excluding functions\n\nUse the `-exclude` flag to specify a path to a file co",
"github_repo": "kisielk/errcheck",
"github_stars": 2519,
"github_topics": [
"errcheck",
"error",
"go",
"linter"
],
"homepage": "https://github.com/kisielk/errcheck",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 13,
"installs_365d": 161,
"installs_90d": 43,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "errcheck",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 7817,
"rank_365d": 7901,
"rank_90d": 7733,
"raw_hash": "5e9537d28792eb42",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/e/errcheck.rb",
"tap": "homebrew/core",
"test_dependencies": [
"go"
],
"uses_from_macos": [],
"version_head": null,
"version_stable": "1.20.0",
"versioned_formulae": [],
"why_use_this": null
}