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.