A static analysis tool that finds unchecked errors in Go code.
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.
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.
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.
errcheck checks that you checked errors.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Specializes in identifying silently ignored errors by ensuring all returned errors are assigned or discarded, as core to its design for preventing bugs early.
Supports configurable exclude files with detailed formats for ignoring specific functions or packages, allowing tailored checks without overcomplicating analysis.
Respects custom build tags via the -tags flag, ensuring accurate scanning across different build configurations, similar to go build.
Provides an Analyzer instance for the go/analysis API, enabling seamless integration with larger static analysis toolchains for modular use.
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.
The -ignore flag method is deprecated, which can confuse users and necessitate migration to the newer exclude file system, adding maintenance overhead.
Setting up and managing exclude files with specific syntax adds complexity, especially for large codebases, without built-in automation or smart defaults.