A Java static analysis tool that checks source code against a coding standard, configurable via XML and run from the command line, Ant, or Maven.
meta/infer
A static analysis tool that finds bugs in Java, C, C++, and Objective-C code without running it.
- Stars
- 15,746
- Forks
- 2,101
- Open issues
- 194
- Last commit
- 2 days ago
What is it?
Infer is a static analyzer that checks source code for bugs such as null pointer dereferences, memory leaks, and resource leaks without executing the program. It supports Java, C, C++, and Objective-C, and is written in OCaml.
Infer is distributed as a packaged release and can also be built from source. The project's documentation covers installation and contribution workflows. Enabling Java support may require installing components under the GPL license.
The project is MIT-licensed and is maintained as an open-source repository under the facebook organization.
Key features
- 01Detects bugs such as null dereferences and memory or resource leaks statically.
- 02Supports Java, C, C++, and Objective-C codebases.
- 03Available as packaged releases or buildable from source.
- 04Written in OCaml and licensed under MIT.
Use cases
- Catching memory and resource leaks in C or C++ projects before release.
- Finding null pointer bugs in Java codebases during code review or CI.
- Scanning Objective-C iOS or macOS code for defects.
Quick start
- 1
Read the Getting Started page for packaged versions of Infer
- 2
To build from source, follow INSTALL.md
Things to know
- Enabling Java support may require downloading and installing components licensed under the GPL.
Topics
FAQ
- What is infer?
- A static analysis tool that finds bugs in Java, C, C++, and Objective-C code without running it. Infer is a static analyzer that checks source code for bugs such as null pointer dereferences, memory leaks, and resource leaks without executing the program. It supports Java, C, C++, and Objective-C, and is written in OCaml.
- Is infer free to use? What license does it have?
- infer is open source under the MIT license. Check the license terms before using it in commercial products.
- Is infer still maintained?
- Actively maintained. The last commit to infer was on Nov 5, 2026.
- What can I use infer for?
- Catching memory and resource leaks in C or C++ projects before release. Finding null pointer bugs in Java codebases during code review or CI. Scanning Objective-C iOS or macOS code for defects.
- How do I install infer?
- Read the Getting Started page for packaged versions of Infer To build from source, follow INSTALL.md
- Where can I get infer?
- The source code and installation instructions are on GitHub: https://github.com/meta/infer
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A pluggable linter for ECMAScript/JavaScript that finds problematic patterns in code and can automatically fix many of them.
A static analysis tool for PHP that finds bugs in code without running it.
A static code analyser for Python that checks for errors, enforces coding standards, and flags code smells without running your code.
A fast, configurable Go linter that drops in for golint and supports custom rules and output formatters.
A Python tool, written in Rust, that visualizes and enforces module dependencies and public interfaces in a codebase.