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 directory 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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top