Infer: A Look Into Facebook's New Java Static Analysis Tool | Takipi Blog
What is Facebook's Infer?
Before assessing its potential usefulness, the first step is of course to get a sense of what the tool is and does. Infer is a static analysis tool that Facebook recently released as open source. Designed for iOS and Android usage, it can be used to detect bugs in your application before it ships. Facebook's engineers have been using Infer as an internal tool on its Facebook and Instagram apps, so it's been well vetted for high scale mobile environments.
Roughly, the way it works is that it scans your code during compilation looking for certain pre-conceived bugs and error conditions. After capturing information on your compilation process, it analyzes it in search of potential bugs. If it finds any, it will report them to you in your terminal and write them to a directory file. Examples of the types of bugs it looks for are null pointer exceptions and resource leaks.
Setting up Infer requires Python 2.7 and either Mac OS X or Linux. To run it, you can use javac directly or go through build tools like Maven or Gradle. Here's an example of what it looks like in action:
Read full article from Infer: A Look Into Facebook's New Java Static Analysis Tool | Takipi Blog
No comments:
Post a Comment