infer
A static analyzer for Java, C, C++, and Objective-C
Static analysis tool from Facebook that scans Java, C, C++, and Objective-C source for null derefs, memory leaks, and other bugs without running the code.
Infer is a static analysis tool for Java, C++, Objective-C, and C, written in OCaml and originally developed at Facebook. Static analysis means it examines your source code without actually running it, looking for bugs such as null pointer dereferences (trying to use a variable that has no value), memory leaks (allocating memory that never gets freed), and other common coding errors. This kind of tool can catch problems before code is tested or deployed. Infer is licensed under the MIT License, though enabling Java support may require downloading additional components under the GPL. The README does not provide further detail beyond pointing to the documentation website at fbinfer.com for installation and getting-started guides.
Where it fits
- Add a static analysis gate to a C++ project that blocks PRs introducing null derefs
- Scan an Android codebase for memory and concurrency bugs before release
- Run a one off audit of a legacy Objective-C iOS app for resource leaks
- Wrap an existing make or gradle build with infer capture and analyze