Page MenuHomePhabricator

scan-build: Add support of the option --exclude like in scan-build-py

Authored by sylvestre.ledru on Sep 16 2018, 12:48 PM.



To exclude thirdparty code.

To test:
With /tmp/foo.c

void test() {
    int x;
    x = 1; // warn
$ scan-build --exclude non-existing/  --exclude /tmp/ -v gcc -c foo.c                                                                                                                                                                                   

scan-build: Using '/usr/lib/llvm-7/bin/clang' for static analysis
scan-build: Emitting reports for this run to '/tmp/scan-build-2018-09-16-214531-8410-1'.
foo.c:3:3: warning: Value stored to 'x' is never read
  x = 1; // warn
  ^   ~
1 warning generated.
scan-build: File '/tmp/foo.c' deleted: part of an ignored directory.
scan-build: 0 bugs found.

Diff Detail


Event Timeline

sylvestre.ledru edited the summary of this revision. (Show Details)Sep 16 2018, 12:49 PM

Fix the indentation

This revision is now accepted and ready to land.Sep 16 2018, 1:00 PM
This revision was automatically updated to reflect the committed changes.