Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. errcheck

errcheck

MITGov1.20.0

A static analysis tool that finds unchecked errors in Go code.

GitHubGitHub
2.5k stars146 forks0 contributors

What is errcheck?

errcheck is a static analysis tool for Go that scans code to identify silently ignored errors. It ensures that all returned errors from function and method calls are either assigned to a variable or explicitly discarded, helping developers catch potential bugs early in the development process.

Target Audience

Go developers and teams focused on code quality and reliability, particularly those building applications where robust error handling is critical, such as backend services, CLI tools, or distributed systems.

Value Proposition

Developers choose errcheck for its focused, simple approach to error detection without overcomplicating analysis, its integration with the go/analysis API for toolchain compatibility, and its flexible exclusion options to tailor checks to specific codebases.

Overview

errcheck checks that you checked errors.

Use Cases

Best For

  • Enforcing consistent error handling practices across large Go codebases to prevent silent failures.
  • Integrating into CI/CD pipelines to automatically catch unhandled errors before deployment.
  • Checking vendored dependencies or code with custom build tags using its build-aware scanning.
  • Teams adopting static analysis toolchains via its go/analysis Analyzer for seamless integration.
  • Excluding specific functions or packages from error checks via configurable exclude files for tailored linting.
  • Identifying ignored type assertion results or blank identifier assignments with optional flag-based checks.

Not Ideal For

  • Projects requiring deep error flow analysis, such as tracking how errors are logged or propagated after assignment
  • Codebases stuck on Go versions older than 1.22, as errcheck requires a minimum of Go 1.22
  • Teams preferring all-in-one static analysis suites with auto-fix capabilities, since errcheck only reports issues
  • Environments where error handling is already enforced through custom linters or frameworks, making errcheck redundant

Pros & Cons

Pros

Focused Error Detection

Specializes in identifying silently ignored errors by ensuring all returned errors are assigned or discarded, as core to its design for preventing bugs early.

Flexible Exclusion Options

Supports configurable exclude files with detailed formats for ignoring specific functions or packages, allowing tailored checks without overcomplicating analysis.

Build Tag Awareness

Respects custom build tags via the -tags flag, ensuring accurate scanning across different build configurations, similar to go build.

Toolchain Integration

Provides an Analyzer instance for the go/analysis API, enabling seamless integration with larger static analysis toolchains for modular use.

Cons

Limited Analysis Depth

Only checks for error assignment, not further analysis on assigned errors like proper handling or logging, as admitted in the README, requiring complementary tools for deeper insights.

Deprecated Ignore Methods

The -ignore flag method is deprecated, which can confuse users and necessitate migration to the newer exclude file system, adding maintenance overhead.

Manual Configuration Overhead

Setting up and managing exclude files with specific syntax adds complexity, especially for large codebases, without built-in automation or smart defaults.

Frequently Asked Questions

Quick Stats

Stars2,515
Forks146
Contributors0
Open Issues14
Last commit27 days ago
CreatedSince 2013

Tags

#developer-tools#error#linter#code-quality#error-handling#go-tools#go#static-analysis

Built With

G
Go

Included in

Go169.1kStatic Analysis & Code Quality14.5k
Auto-fetched 1 day ago

Related Projects

golangci-lintgolangci-lint

Fast linters runner for Go

Stars19,051
Forks1,578
Last commit4 days ago
PHP ParserPHP Parser

A PHP parser written in PHP

Stars17,440
Forks1,121
Last commit3 months ago
TypeScript ESLintTypeScript ESLint

:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

Stars16,266
Forks2,918
Last commit1 day ago
pyrightpyright

Static Type Checker for Python

Stars15,472
Forks1,787
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub