Jenkins Clang Scan-Build Plugin support for Xcode5 and later

The Jenkins Clang Scan-Build Plugin have not been updated for years. I fixed existing bugs to make it usable in Xcode 5,6 and latest clang-static-analyzer. I have published on Github, you could check out for more details.

Fixed Bugs:

  • Fix “404 not found” bug when click “Details” in scan-build bug report
  • Fix incorrect logic of finding xcode workspace
  • added default argument for scan-build and xcodebuild additional arguments
    • added --use-analyzer Xcode in scan-build additional arguments: this would make scan-build use clang executable from Xcode instead of its own
    • added -derivedDataPath $WORKSPACE/build in xcodebuild additional arguments: this will save build products and other derived data to ‘build’ directory under current worksapce

How to use:

  • git clone
  • cd clang-scanbuild-plugin
  • mvn clean package -Dmaven.test.skip=true
  • find clang-scanbuild-plugin.hpi in target directory
  • upload this .hpi file via "Manage Plugins">"Advanced">"Upload Plugin"
  • restart Jenkins to update the plugin

Setting in Jenkins job:

  • Add build step “Clang Scan-Build”, example below:clang-scan-build-setting
  • As above image displays, you can leave workspace empty, thus the plugin would search workspace location in Xcode project directory ( a.k.a the jenkins workspace directory plus “Xcode project sub-path”)
  • Add post-build action: “Publish Clang Scan-Build Results”

Any concerns, you could fire an issue 🙂


3 thoughts on “Jenkins Clang Scan-Build Plugin support for Xcode5 and later

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s