Any way to have an entire directory ignored by the static analyzer in xcode?
I have a project that relies on the some external sources and I would prefer not to change them. The problem is that a lot of warnings are generated from these sources and it also slows down the whole process of running the analyzer on the code.
All these source files to be ignored are in the same directory so it would be convenient to able to flag the d开发者_高级运维irectory as a no go place for the analyzer.
Convenient yes, but possible?
See my answer here. You can add a compile flag to the files and static analyzer will ignore them.
You can mass add flags by multi-selecting files, pressing enter, entering the flags, and pressing enter again. If the third party code has been written with the proper name spacing, you should be able to use the filter to only show the files in those directories.
Dont know how it can be achieved like you mentioned. However, I would create a static library out of those files (inside that particular directory) and that will solve your problem. Static analyzer does not go into static libraries (.a files) and generate warnings, so you are safe to run it.
精彩评论