Infer installation and environment configuration on MAC
Infer Introduction
Infer is a static analysis tool. Infer can analyze objective-c, Java, or C code to report potential problems.
Anyone can use infer to detect apps, which can kill serious bugs before they are released, while preventing app crashes and poor performance.
Infer installation
Infer provides pre-built binaries for Linux and Mac OS systems, and if you just want to use infer and don't want to contribute code to the project, these binaries are enough. Conversely, if you want to compile infer, please select Source installation. This article takes the MAC system as an example.
Environmental Requirements
Python version: Greater than or equal to 2.7
First Type: binary file installation
From the Infer release page, get the latest version of INFER-OSX-VXX.TAR.XZ, identified by OSX, and then execute the following command to install infer.
Tar XF infer-osx-vxx.tar.xz# This assumes if bash, adapt to your needs in case you use# another Shellecho "Export PAT h= $PATH: ' pwd '/infer-osx/infer/infer/bin >> ~/.bashrc && Source ~/.BASHRC
The second type: source installation
With Brew Installation
1.1 Installing Brew
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
1.2 Installing infer
Brew Install Infer
Infer version information can be viewed via ' infer--version ' after installation reaches 100%
1.3 Configuring to environment variables
echo "Export path=\" \ $PATH:p wd/infer/infer/bin\ "\ >> ~/.bash_profile &&source ~/.bash_profile
After the execution of the above operation, if the error is not successful.
Infer installation and environment configuration on MAC