Reputation: 34983
I want my Xcode project's tests to fail when there are analyzer warnings or errors.
Running the Xcode "Analyze" command points out the analyzer errors in your project:
However, when I use Xcode's "Test" command on this same target I'm all green:
Is there a way to add a "Run Static Analyzer" test or build phase to the testing target? We are using XCTest
. I find myself sometimes testing the target and thinking things are fine, only to have forgotten to fix a simple memory issue.
Our tests should fail when there are analyzer warnings or errors.
Upvotes: 0
Views: 579
Reputation: 12770
You can set it to analyze during build in the build settings (just search for analyze). Set "Analyze during 'Build'" to YES.
Upvotes: 1