Infer is a static code analysis tool developed by Meta for detecting potential defects in Java, C, C++ and Objective-C programs. It examines source code without executing the application, helping developers identify problems before they reach production.
The analyser uses a two-stage workflow. First, it captures compilation commands and translates source files into an intermediate representation. It then analyses functions and methods, building summaries that allow it to reason about behaviour across procedure boundaries and source files.
Infer employs several specialised analysis engines. These examine memory safety, resource management, concurrency and other aspects of program correctness. The tool can analyse individual files or larger projects, with options for incremental analysis and comparing results between code revisions.
This is free and open source software.
Key Features
- Pulse analysis identifies null-pointer dereferences, use-after-free errors and other memory safety problems.
- Detects memory leaks, resource leaks and invalid accesses to objects.
- Identifies potential buffer overruns and uses of uninitialised values.
- RacerD detects potential data races and thread-safety violations.
- Reports dead stores, unused values and selected redundant operations.
- Cost analysis estimates computational complexity and identifies potential performance regressions.
- Supports taint analysis for tracing potentially unsafe data flows.
- Detects certain infinite recursion and non-termination problems.
- Configurable analysis engines and issue types.
- Supports compilation databases and integration with existing build systems.
- Incremental analysis examines changed code without requiring a complete reanalysis.
- Differential reporting distinguishes introduced, fixed and pre-existing issues.
- Generates text and JSON reports, with tools for exploring analysis results.
- Cross-platform support – runs on Linux and macOS.
Website: github.com/facebook/infer
Support:
Developer: Facebook, Inc. and its affiliates
License: MIT License
Infer is written in OCaml. Learn OCaml with our recommended free books and free tutorials.
Related Software
| Java Linter Tools | |
|---|---|
| SpotBugs | Find bugs in Java code |
| PMD | Extensible cross-language static code analyzer |
| Error Prone | Catch common Java mistakes |
| NullAway | Eliminate NPEs in Java code |
| Infer | Static analysis tool for Java, C++, Objective-C, and C |
| Checkstyle | Write Java code that adheres to a coding standard |
| Checker Framework | Pluggable type-checking for Java |
Read our verdict in the software roundup.
| C and C++ Linters | |
|---|---|
| OCLint | Static code analysis tool for improving quality and reducing defects |
| cpplint | Static code checker for C++ |
| CodeChecker | Platform for running static analysers and managing code defects |
| Uncrustify | Source code beautifer |
| Infer | Static analyser that detects bugs in Java, C and C++ code |
| Include What You Use | Source analysis tool for C and C++ projects built on Clang |
| Cppcheck | Static analysis tool for C/C++ code |
| flawfinder | Scans C and C++ source code for potential security weaknesses |
| clazy | Qt-focused static analyser that catches common C++ mistakes |
| ClangFormat | Code formatting tool |
| Clang-Tidy | Clang-based C++ “linter” tool |
| Smatch | Static analysis tool for finding defects in C code |
| Coccinelle | Semantic patching tool for analysing and transforming C code |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.