Make static analysis failure cause build failure on Travis

Viewed 808

I have an Objective-C iOS library building on Travis CI. I just enabled static analysis in my .travis.yml file, and it found an issue (a dead store), but it did not fail the build on Travis. Here is the relevant line in my .travis.yml (line-wrapped for readability):

- set -o pipefail && xcodebuild analyze
    -workspace Example/BonMot.xcworkspace
    -scheme BonMot-Example
    -destination 'name=iPhone 6' ONLY_ACTIVE_ARCH=NO | xcpretty

What do I need to do in order to cause a warning in this line to fail the build on Travis CI? You can see the relevant pull request on my project here.

3 Answers
Related