An option to exclude specified paths from the generated analysis report. This would allow for specific code parts that are part of the build to be excluded from the resulting report. For example: scan-build --exclude=/foo/src/mycodebase/nothisdir make Would result in analysis of the project located in '/foo/src/mycodebase/' and it's subdirs, but would exclude '/foo/src/mycodebase/nothisdir' in the generated report. This would be useful in a scenario where a build project has a lot of prerequisite/dependent code that does get included in a build of the project, but may not be of primary interest for the developers of the main project.
+1 for the feature request. This would also help researchers to examine a certain section of the project.
For me this would also be a very useful feature; right now the absence of such a feature prevents me from making (effective) use of scan-build on some projects/codebases.
Another +1 for this feature. We compile a lot of 3rd-party code as part of our build process, but we don't really want to know if there are issues with code outside our control.
This featured would be a great addition to the scan-build. We have a large number of files contributed from another project and the library. We aren't going to fix them in our project now. We might want to fix them upstream, later. Until that happens, we'd like to hide bugs coming from external code. Right now there's no way to do it.
Yeah, it has been implemented in 2018: https://reviews.llvm.org/D52153