Search code examples
xcodeclang-static-analyzer

Getting HTML output from Xcode's built-in static analysis


When I use the Build & Analyze option in Xcode I see a very useful visual output integrated into the IDE, showing code paths, memory leaks, dead-stores, etc.

In Xcode there is a build setting that will allow you to run the static analyser (clang) as part of each build. But when I do this the output is in plain plist files within the build folder.

Is there any way to generate a human viewable HTML output from those plist files?


Solution

  • I don't know if it is something new on Xcode 6 but if you execute from the command line xcodebuild CLANG_ANALYZER_OTHER_FLAGS= CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=$HOME/tmp RUN_CLANG_STATIC_ANALYZER=YES it generates a directory with html inside of it.