<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/86094>86094</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            scan-build "--exclude" option do not exclude 3rparty directory from large project as expected.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          cgilles
      </td>
    </tr>
</table>

<pre>
    Hi,

I'm a long time user of the static analyzer. I parse the whole digiKam project to clean up entries.

The digiKam project includes source code from 3rdparty libraries. I use a bash script to run the analyzer with many "--exclude __absolute_path__" arguments to try to ignore unwanted entries. This do not work as expected...

The bash script can be seen [here](https://invent.kde.org/graphics/digikam/-/blob/master/project/reports/clangscan.sh?ref_type=heads)

The script use a file at root repository dir named .krazy which share configuration with others analyzers (as cppcheck, clazy, krazy, etc.). The file is this [one](https://invent.kde.org/graphics/digikam/-/blob/master/.krazy?ref_type=heads)

The first line of this is the most important as it's a list of relative directory to skip from the analysis.

I generated 3 files resulting of one analyze. 

[01-scan-build-configure.txt](https://github.com/llvm/llvm-project/files/14689836/01-scan-build-configure.txt)

This is the configuration stage where you can see the absolute path to exclude.

[02-scan-build-compilewarnings.txt](https://github.com/llvm/llvm-project/files/14689892/02-scan-build-compilewarnings.txt)

This is a small part of the compilation where a directory excluded is reported with analysis errors.

[03-scan-build-endcompilation.txt](https://github.com/llvm/llvm-project/files/14689915/03-scan-build-endcompilation.txt)

This is the end of the compilation. Look the excluded directories list which is reduced a lots.

The question is... why?

Thanks in advance for your help.

Gilles Caulier
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslkFv4zgPhn-NciFi2HKcxIccplP4-4rd49wLWmJsbWTJK8rNZH79QnbTJtPZnV1gLo0BWyL58H3JIrPpHNFBVA-ielzhFHsfDqoz1hKvWq8vh_8bIT-L_FHkn5a_T0LuBkCw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