Freedom251 › Static Analysis Tools
Infer

What Infer is
Infer is a static analysis tool that examines compiled source files and reports potential bugs before code ships. It supports Java, C, C++, Objective-C, and Erlang. Its Java checks cover issues such as null pointers, resource leaks, missing lock guards, and concurrency races; its C-family checks include null dereferences, memory leaks, coding conventions, and unavailable APIs. Infer can reason across methods or functions in different files. Pulse analyzes memory safety, while RacerD checks thread safety. The workflow captures compilation commands, analyzes the captured files, and produces reports you can explore with `infer explore`. As a result, files that are not compiled are not analyzed. Integrations are documented for build tools including Buck, CMake, Gradle, Make, Maven, and Xcodebuild. You can install a binary release, build from source, or use Docker; a small browser example is also available through Codeboard. The free plan costs nothing. Infer is available for Linux and macOS, not Windows.
Who it suits
Infer suits developers and teams who want static checks for supported languages in a build or CI workflow. It may also suit people who want to build the tool from source or try its small browser example.
What it does well
- Checks Java, C, C++, Objective-C, and Erlang.
- Can find issues spanning multiple functions or files.
- Integrates with several documented build systems.
- Free plan costs nothing.
- Offers binary, source, Docker, and browser options.
What to know first
- Files not compiled are not analyzed.
- Windows is not supported.
- Java support may require GPL-licensed components.
Limits
Infer analyzes only files captured during compilation, so files that are not compiled are not analyzed. Cost analysis has experimental Hack support and no Python, Rust, or Swift support.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Infer (free) | Static analysis for supported programming languages; downloadable binary, source build, or Docker image | Free |
As fbinfer.com lists them, read 2 Oct 2026. The maker's own page has the final word.
Getting started
- Choose a Linux or macOS binary release, build Infer from source, or use a Docker image.
- Connect Infer to a documented build system such as Gradle, Maven, CMake, or Xcodebuild.
- Capture the project's compilation commands and files.
- Run analysis on the captured files and explore the reports with infer explore.
- Try the small browser example through Codeboard.
Overview
Infer is a free static analyzer for teams that want potential bugs surfaced before code ships, particularly in Java and C-family projects. Its ability to reason across files is a meaningful advantage for bugs that local checks can miss, provided the build and platform fit its capture-based workflow.
Key features
Infer records compilation commands, analyzes the files included in that compilation, and produces reports developers can explore with infer explore. This connects analysis to existing builds, but leaves a clear blind spot: a file that is not compiled is not analyzed. For CI, the recommended approach is to identify changed files and run reactive analysis from them.
Checks cover different concerns by language. For Java and Android, Infer looks for null-pointer exceptions, resource leaks, annotation reachability issues, missing lock guards, and concurrency races. For C, C++, and Objective-C, it checks for null dereferences, memory leaks, coding-convention issues, and unavailable APIs. Its cross-function and cross-file reasoning is useful when a bug depends on how separate methods interact, rather than on one isolated line.
Pulse provides interprocedural memory-safety and value analysis, including Java null-dereference detection; RacerD focuses on thread safety. Cost analysis estimates asymptotic function complexity for Java and C-family languages. Hack support is experimental, and Python, Rust, and Swift are not supported by cost analysis.
Documented build integrations include ant, Buck, CMake, Gradle, Make, Maven, xcodebuild, xctool, and compilation databases. Users can install a binary release, build from source, or use Docker; a small browser example is also available through Codeboard. Infer is used in Meta's CI pipeline to verify selected properties of code changes across projects including Facebook, Messenger, Instagram, and WhatsApp, evidence of deployment at scale rather than a guarantee for every project.
Pricing
Infer (free): free. The free plan provides static analysis for supported programming languages, with a downloadable binary, source build, or Docker image. There are no paid tiers or seat and quota terms to weigh in this plan.
The repository is MIT-licensed, though enabling Java support may require GPL-licensed components. Teams evaluating licensing should account for that distinction, especially when distributing or embedding tooling.
Platforms
Infer supports Linux and macOS releases and can be self-hosted; a browser example offers a limited way to try it online. Windows is not supported. The suggested workaround is a Linux virtual machine, which is viable only if the project itself can compile on Linux. This makes Infer a poor fit for Windows-only build environments.
Who it's for
Infer is best suited to engineering teams with Java or C-family code, builds that can run on Linux or macOS, and CI workflows where compilation capture can be maintained. Its cross-file analysis and range of build integrations make it attractive for teams targeting correctness and safety issues without adopting a paid plan. It is less suitable when Windows is mandatory, when important files are not compiled in the analyzed workflow, or when the required language falls outside its supported set.
Pros and cons
Pros
- Cross-file reasoning: can find issues such as null dereferences and data races that span multiple functions or files.
- Broad build integration: documented support for common build systems and compilation databases can fit established workflows.
- Free deployment choices: binary, source, and Docker options allow teams to choose how to run it without a subscription.
Cons
- Compilation-dependent coverage: files not compiled during capture are not analyzed, so coverage depends on the build workflow.
- No Windows support: Windows-only teams must change environments, and the Linux VM option depends on Linux compilation.
- Language caveats: cost analysis has narrower language support, while Hack support is experimental.
- Java licensing qualification: Java support may involve GPL-licensed components despite the repository's MIT license.
Alternatives
Static Analysis Tools and C and C++ Static Analysis Tools are useful starting points for comparing options by category.
Choose PMD for a free downloadable static analyzer with a BSD-style license, or Clang Static Analyzer for an open-source analyzer focused on C, C++, and Objective-C. Cppcheck is another option for free core static analysis, with a paid Project plan also offered.
MATLAB Grader is free with a current MATLAB maintenance license; LMS integration requires a qualifying academic license. Qodana offers a Community plan with a free tier and trial, while Semgrep Code has a Free Edition capped at 10 repositories and 10 contributors, with 60 AI credits. Snyk Open Source is a closer alternative for software-composition analysis, with its free plan limited to five projects. CodeScene may suit open-source projects seeking its free Community Edition features, including automated PR reviews, hotspots, and knowledge distribution.
Verdict
Choose Infer if you need free, cross-file static analysis for supported Java or C-family code and can build on Linux or macOS. Its strongest case is reasoning across functions within an existing CI and compilation workflow. Look elsewhere if Windows is essential, your target files are not compiled in the analysis path, or your language and analysis needs exceed its supported scope.
Verdict
Infer offers broad static analysis for several languages, with checks that can follow bugs across files. Its compilation-capture workflow and lack of Windows support are important constraints to consider.
Questions
How much does Infer cost?
Infer is free; its listed plan is free.
Which languages does Infer analyze?
The supported language list includes Java, C, C++, Objective-C, and Erlang.
Which platforms are supported?
Binary releases are described for Linux and macOS. Infer is not supported on Windows.
Is Infer open source?
The Infer repository states that it is MIT-licensed. Enabling Java support may require GPL-licensed components.
What build tools does Infer integrate with?
Documented integrations include ant, Buck, CMake, Gradle, Make, Maven, xcodebuild, and xctool.
How do I get started?
You can download a binary release, build from source, or use a Docker image. A small example is also available in a browser through Codeboard.
Facts from Infer's own pages
- Analysis workflow
- Infer captures compilation commands, analyzes the captured files, and writes reports that can be explored with infer explore. · fbinfer.com, 2 Oct 2026
- Browser demo
- Infer can be tried on a small example in a browser through Codeboard. · fbinfer.com, 1 Oct 2026
- Bug detection
- Infer can detect issues including null pointer dereferences, data races, and other bugs that may span multiple functions or files. · fbinfer.com, 2 Oct 2026
- Build integrations
- Documented build system integrations include ant, Buck, CMake, Gradle, Make, Maven, xcodebuild, and xctool. · fbinfer.com, 2 Oct 2026
- C-family checks
- For C, C++, and iOS/Objective-C, Infer checks null pointer dereferences, memory leaks, coding conventions, and unavailable APIs. · fbinfer.com, 1 Oct 2026
- Checker features
- Available checkers include Pulse for general-purpose memory and value analysis and RacerD for thread-safety analysis. · fbinfer.com, 2 Oct 2026
- CI use
- The recommended CI flow is to identify modified files and run analysis in reactive mode starting from those files. · fbinfer.com, 2 Oct 2026
- Cost analysis
- Cost analysis computes asymptotic function complexity and supports C/C++/Objective-C and Java, with Hack experimental and no Python, Rust, or Swift support. · fbinfer.com, 1 Oct 2026
- Deep analysis
- Infer can detect issues such as null pointer dereferences and data races by reasoning across multiple functions or methods in different files. · fbinfer.com, 1 Oct 2026
- Deployment
- Infer runs in Meta's continuous-integration pipeline to verify select properties of code modifications for projects including Facebook, Messenger, Instagram, and WhatsApp. · fbinfer.com, 1 Oct 2026
- Download options
- Users can download binary releases, build Infer from source, or use a Docker image; the getting-started guide also offers a small browser example through Codeboard. · fbinfer.com, 2 Oct 2026
- Installation
- Infer can be installed from binary releases, built from source, or run using Docker images. · fbinfer.com, 1 Oct 2026
- Integrations
- Infer documents integrations for Buck, cmake, Gradle, Make, Maven, Xcodebuild, xctool, and compilation databases. · fbinfer.com, 1 Oct 2026
- Java checks
- For Android and Java, Infer checks null pointer exceptions, resource leaks, annotation reachability, missing lock guards, and concurrency race conditions. · fbinfer.com, 1 Oct 2026
- Languages
- The documentation lists Java, C, C++, Objective-C, and Erlang; the latest release notes also describe Python and Swift frontends and an experimental Rust frontend. · fbinfer.com, 2 Oct 2026
- License
- The Infer repository states that Infer is MIT-licensed, while noting that enabling Java support may require GPL-licensed components. · github.com, 1 Oct 2026
- Limit
- Infer analyzes files captured during compilation, so if no file is compiled, no file is analyzed. · fbinfer.com, 2 Oct 2026
- Maker use
- Infer is deployed within Meta's continuous integration pipeline to verify selected properties of code modifications across projects including Facebook, Messenger, Instagram, and WhatsApp. · fbinfer.com, 2 Oct 2026
- Pulse
- Pulse is an interprocedural memory safety analysis that can detect null dereferences in Java. · fbinfer.com, 1 Oct 2026
- Purpose
- Infer is a static analysis tool that produces a list of potential bugs from Java or C/C++/Objective-C code. · fbinfer.com, 1 Oct 2026
- Support
- The project directs users to GitHub issues and the #infer IRC channel on Libera Chat for questions and issue reports. · fbinfer.com, 2 Oct 2026
- Supported languages
- Infer is a static program analyzer for Java, C, C++, Objective-C, and Erlang, written in OCaml. · fbinfer.com, 1 Oct 2026
- Supported systems
- The latest release is described as a binary release for Linux and macOS, while the support FAQ says Infer is not supported on Windows. · github.com, 2 Oct 2026
- What it does
- Infer is a static analyzer that reports potential bugs in source code before it ships. · fbinfer.com, 2 Oct 2026
Where Infer stands on Freedom251
- Static Analysis Tools#10 of 38
- C and C++ Static Analysis Tools#8 of 25