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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy 14]: How to exclude clang-tidy static analysis of 3rd packages in conan folder
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          honey-speaks-tech
      </td>
    </tr>
</table>

<pre>
    Hello everyone,

I'm trying to configure clang-tidy in my C++ project folder. It's with great challenge, but so far I've achieved most of my project requirements for clang-tidy except one. clang-tidy is analysing and throwing errors from 3rd party packages in my .conan (/root/.conan/data/) folder. I tried all combinations of HeaderFilterRegex and --header-filter possible. Some example experiments are:

`#HeaderFilterRegex: '^src/app/*|^(?!/root/.conan/data/).*$'`
`HeaderFilterRegex: '^((?!/root/.conan/data/|/builds/).)*$'`

Could anyone help me sort out this issue? I was able to filter other external libraries in other ways, but not yet filter and exclude .conan packages. Please see below screenshot of clang-tidy issues throwing from 3rd party conan packages.

![image](https://github.com/llvm/llvm-project/assets/2928745/1b689582-31c9-4818-974c-284f085109ae)

#clang-tidy #exclude #static-analysis #header-filter #HeaderFilterRegex #PleaseHelp

Thanks,
Honey

Honey Sukesan

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlM1yozgQx59GvnThAgEGDj7kY6jktrWzL9BAA9oIiVWLOLz9liBOnNmp2ZoLlFu4P_7_nxqZ1WCIziK_F_njARc_WnceraE14pnwhSNP7XhobLeen0hrC_RKbrWGhHwQ8aOI7_bns5DFBN6tygzgLbTW9GpYHEGr0QyRV90KysC0woOQ90Lew-zs39R66K3uyB3h2QtZMFyUH2FwhB7aEbUmM4Ri0Cwe2EKPDkKxVwJsR0Wv1MFk2YPtQ_JrUkf_LMrRRMYz9NbdtkFvLc0erKHjl-4Y0KBeOYyApgM_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