LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 22594 - exclude specified paths from analysis with scan-build
Summary: exclude specified paths from analysis with scan-build
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Static Analyzer (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: Sylvestre Ledru
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-15 04:23 PST by John Smith
Modified: 2020-02-18 08:59 PST (History)
10 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2015-02-15 04:23:51 PST
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.
Comment 1 Saheel Ram Godhane 2015-02-23 13:13:03 PST
+1 for the feature request. This would also help researchers to examine a certain section of the project.
Comment 2 Maarten Hoes 2015-11-20 01:47:53 PST
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.
Comment 3 Jonathan Thackray 2017-02-08 05:03:33 PST
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.
Comment 4 Wojciech A. Koszek 2017-04-14 17:24:11 PDT
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.
Comment 5 Sylvestre Ledru 2020-02-18 08:57:21 PST
Yeah, it has been implemented in 2018:
https://reviews.llvm.org/D52153