Skip to content

Instantly share code, notes, and snippets.

@lqi
Created June 4, 2013 12:15
Show Gist options
  • Save lqi/5705477 to your computer and use it in GitHub Desktop.
Save lqi/5705477 to your computer and use it in GitHub Desktop.
source ~/.bash_profile
cd ${SRCROOT}
/path/to/xctool.sh -reporter json-compilation-database:compile_commands.json clean
/path/to/xctool.sh -reporter json-compilation-database:compile_commands.json build
oclint-json-compilation-database | sed 's/\(.*\.\m\{1,2\}:[0-9]*:[0-9]*:\)/\1 warning:/'
Copy link

ghost commented Jan 31, 2014

@andresbrun
Copy link

I needed to define the -scheme argument in order to execute xctool.

@andrewagain
Copy link

@andresbrun you won't need the -scheme argument if you put it in your .xctool-args file.

@qiuhm
Copy link

qiuhm commented Jan 12, 2016

My script is xcodebuild -target OCLintSample clean
xcodebuild -target OCLintSample | xcpretty -r json-compilation-database
oclint-json-compilation-database -- -report-type xcode.
But it doesn't work.

@Nagesh-Chandan
Copy link

what is ${SRCROOT}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment