Search code examples
objective-cxcode4static-analysisanalyzer

XCode 4 Analyze configuration?


Is there a way to configure which types of problems the XCode 4 static Analyzer tool reports and doesn't report?

I'm am dealing with some legacy code that "works" but has tons of static analysis issues, and am trying to list certain potentially more critical issues first.


Solution

  • I don't have a lot of experience customizing Clang (the static analyzer Xcode uses) myself, but this blog post seems to point to two different change you can make:

    1. Turning off some individual warning types in the Build Settings
    2. Using pragma to ignore specific warnings once you're aware of the right argument

    While these options don't really provide any method of "prioritizing" the warnings, you can at least temporarily ignore the ones that you know to be less critical.