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

    <tr>
        <th>Summary</th>
        <td>
            Clan-Tidy not excluding system headers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Hi everyone,
I am trying to analyze a project on Ubuntu using `clang-tidy` version 

```
Ubuntu LLVM version 14.0.0

  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: tigerlake
```

but I am getting a lot of errors from system header files.
I have created a `compile_command.json` file and also added the path of system header files in `compile_command.json`  file to ignore system headers. 
Similarly, I used the` //NOLINT` option and still got errors from the system header files.

I executed  `clang-tidy -checks='cppcoreguidelines'   -header-filter=.* -p path/compile_commands.json src/*.cpp`
here is the output of the command [clang-tidy-output.txt](https://github.com/llvm/llvm-project/files/12499889/clang-tidy-output.txt)

looking for help to resolve the issue.
Thanks :)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlN-PmzgQx_8a8zICgfkVHnhIN4q60l570m3vtTIwgLvG5uxxlPSvP5kkbXPaO-kkZGSY-fo7nxkQzslJI7as_MDKQyQ8zca2RyH_8rhXMurMcGk_SsAT2ovRyPgTSw8s3T-DWIDsReoJyIDQQl2-IwhYrfmGPYHR8KXzmjx4F4JYlfZK6CkmOVxYlcIJrZNGw1Xvtlbp7dq2N4GXlz9_-xGeFUmapL8mAXxeSS7yOw7QeamG5P78gKPwioCEnZBYvofzrvpaFfHax0pqf44n7e_BH40jePr9SwgjOaFV4g3ftXVdO0-wUZiQKFQoQBkCMwJaa6yD0ZoF3MURLjCjGNDCKBW65E5wFieE3qIgHEBshMyySoVfe7MsQg_JN2d0YBXyQOgBhHIGxDDgADQjrILmcOI7p4DU_6V4lSQDctLG4qOCS25d-UMuUgmrLow_wTN4dz03CDB-ZPz46fPL86fXsDcrhfYEk46kUjAZeiAR_P47jTsTPGPvA4_HgYG4n7F_cyw_MF7369obi5OXAyqp0TFeA0B81Y1HqQgtyw8J43uI1w0T48d_sHAbDHC232rZJ_26_ujxjBZBus218bT6rbNhd8sGVn746S--xiR0JlYeGN_NRKtj-f6KaZI0-y7pzcL4UanT_RbfvhbGjxsMxo8ZL5pmt2uC33flefMrMWXMWxi-0ViYUa2hpRadUSfc3ErnPN4Yv85CvznYXDXR0OZDkzciwjarmrzclbssj-Y22xW8KrsqTcu62t7UWV00xVjmdZ72fSRbnvI8bdIsq_I0y5JsVxYjrzgveI1dPbIixUVIlYQSE2OnaHPRVmVWl5ESHSp3_-PYduPQ-cmxIlXSkfuZRpIUtk9K6Pg1DIEOI3XulR9CyY8jG3mr2v9NfTMWsG_e_g4AAP__6AOg7w">