uber-go/nilaway

Static analysis tool to detect potential nil panics in Go code

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 45 minutes ago
Added to GitGenius on September 17th, 2026
Created on July 11th, 2023
Open Issues & Pull Requests: 80 (+2)
GitHub issues: Enabled
Number of forks: 96
Total Stargazers: 3,909 (+0)
Total Subscribers: 12 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.7 days
Mean response time: 126.3 days
90th percentile: 524.3 days
Tracked items: 67

Most active contributors

Sign in to see contributor activity.

How this project is maintained

73% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 93% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 30
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 571 days
Stale 30+ days: 27
Stale 90+ days: 26

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • false positive (23)
  • enhancement (15)
  • good first issue (11)
  • question (5)
  • driver (4)
  • bug (3)
  • documentation (2)
  • false negative (2)

Detailed Description

NilAway is a static analysis tool that detects potential nil panics in Go code at compile time.

NilAway addresses the problem of nil pointer dereferences causing runtime panics by analyzing code flow to identify where nil values might be dereferenced. Unlike the standard nilness analyzer in the Go toolchain, it employs more sophisticated static analysis techniques to track nil flows both within and across packages. The tool uses an inference engine to automatically detect these issues without requiring developers to add annotations or other metadata to their code.

Developers should adopt NilAway if they want to catch nil panics before production while maintaining reasonable build-time performance. The tool is designed to be practical rather than exhaustive, catching most nil panics observed in production while keeping analysis overhead low. It integrates with standard Go analysis drivers including golangci-lint, nogo, and can run as a standalone checker. For large projects with many dependencies, the tool recommends using the include-pkgs flag to analyze only first-party code, which significantly improves performance by skipping dependency analysis. The README notes that modular analysis drivers like bazel/nogo or golangci-lint are preferred over the standalone checker for large projects due to the tool's use of the Fact Mechanism for caching analysis results.

The project is under active development with a stated expectation that false positives and breaking changes may occur. Development activity shows ongoing optimization work to reduce build-time overhead, with measurements indicating less than five percent overhead in typical use. The maintainers are actively soliciting feedback and contributions from users.