5

I'm trying to set up clang static analyzer on a hudson build server and if I follow the advises in this blog post I've got the following errors:

cc1obj: error: unrecognized command line option "-fdiagnostics-print-source-range-info"
cc1obj: warnings being treated as errors
cc1obj: warning: -Wuninitialized is not supported without -O
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1

and if I pass RUN_CLANG_STATIC_ANALYZER parameter to the xcodebuild (without using scan-build) it generates me a few plist files but I have no idea how to present those files to user because I expect for HTML output.

Does anybody succeed with this?

Dmytro
  • 2,522
  • 5
  • 27
  • 36

2 Answers2

1

With Xcode 4 you can create .xcconfig files to override any methods in the project build settings. In this case make a myConfig.xcconfig and put RUN_CLANG_STATIC_ANALYZER = YES; then you can run it by calling "xcodebuild -xcconfig myConfig.xcconfig"

Flippinjoe
  • 61
  • 2
0

It's been more than two years since I asked this question and I decided to use OCLint for this purpose. Looks like a more configurable option and it supports xcodebuild from the box.

Dmytro
  • 2,522
  • 5
  • 27
  • 36