如何在mac os x中安装OCLint

Joh*_*tty 3 macos static-analysis objective-c

我正在尝试使用MAC OS X mavericks在我的mac中安装OCLint它的文档在这里

*以下代码片段是终端启动时获取的.bashrc或.bash_profile文件的示例.*

OCLINT_HOME=/path/to/oclint-release
export PATH=$OCLINT_HOME/bin:$PATH
Run Code Online (Sandbox Code Playgroud)

我怎么能做到这一点?我是否需要创建.bashrc或.bash_profile文件,或添加到现有文件.我在哪里可以找到.bashrc或.bash_profile文件

Ton*_*RAN 11

使用Homebrew安装Oclint是一种快速而有用的解决方案.打开终端并首先安装自制软件:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run Code Online (Sandbox Code Playgroud)

使用此命令安装Oclint 0.11.1

brew install https://gist.github.com/TonyAnhTran/e1522b93853c5a456b74/raw/2f440240fe99634771a3f2353c0c53a43c2d0fb2/oclint.rb
Run Code Online (Sandbox Code Playgroud)

在终端中创建.bash_profile:

Type "cd ~/" to go to your home folder
Type "touch .bash_profile" to create your new file.
Edit .bash_profile with your favorite editor (or you can just type "open -e .bash_profile" to open it in TextEdit.
Type ". .bash_profile" to reload .bash_profile and update any functions you add.
Run Code Online (Sandbox Code Playgroud)

2017年7月31日更新:

before_install:

  • brew cask uninstall oclint
  • brew tap oclint/formula
  • brew install oclint


aed*_*tor 7

brew tap oclint/formulae
brew install oclint
Run Code Online (Sandbox Code Playgroud)

更多细节在这里:https://github.com/oclint/homebrew-formulae