<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107188>107188</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
run-clang-tidy can't actually run clang-tidy on headers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Nekttuman
</td>
</tr>
</table>
<pre>
I noticed that when running
`_./llvmInstall/bin/run-clang-tidy -clang-tidy-binary=./llvmInstall/bin/clang-tidy -header-filter=.* test.cpp test.hpp `
test.hpp will not be checked
after analyzing run-clang-tidy a little, you can notice the following code:
```
# Load the database and extract all files.
database = json.load(open(os.path.join(build_path, db_path)))
files = set(
[make_absolute(entry["file"], entry["directory"]) for entry in database]
)
...
for name in files:
if file_name_re.search(name):
task_queue.put(name)
```
that is, the script runs the task only on files from the database. in my case these files only contain cpp (maybe this is not always the case, I don't know the details of using compile_commands.json)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VN2uozYQfhrnZhRETBLggouzjSIdqeorRIM9BJ8Ym9rDpvTpKwObTVdthIKZ-b7xNz82xmjujqgRp2_idNnhxL0PzR_0YJ4GdLvW67n5BOfZKNLAPTI8e3IQJueMu4v8IvIPcc5vmZBXa78Pny4yWivktTVOyGuY3F5ZdPc9Gz3D23rfGodhFsXl_7jvvJ5QU9h3xjKFlfMBTJEzNY7roh9HEOd81fSyPI21KQFoCVRP6kF6U738Y8cUAB3a-W_j7vCLXgRrmC0J-RvMfgKFbqsGcE_QeWv9M_GU1ySKj1dBtmf9lAX87lEvFI2MLUYCdBroLw6oGNBa6IylmK2MF0gUF_iK3mXWoxay8iO59IrZiNxnXz4VqmonY_UtWZJO3W7LenuWkEv4JV4kFrLapJ2-DfigG7bR24lJyIochzkNhJSJI6QUp0uK--bQJpBiH-Yf3ho6H1YEGPdKMvm2EmwysmxLMeEdDpTgi7ZX9QBMt5huyX8LlEXCoHohq2RIoX5C048xPm5_TjRRNk78BvuvZiwzbGJKKLUjqmBGTm2Py3eKBd7ZGfymC7rgh3-1LkuahxlU6hD3FGlDLjzlHaNxkOZSyGrAuU0oE8HEZRDRPnFed0sRkpJP0N4JWTI8nH-umxGjsRF8B1NcJ2wYU1GUHwZ0OmZpLoSsd7opdF3UuKPmUMrTsciPebXrm_ysdV6e6lLldZkXVXs4lzUdasQaFcp6ZxqZy2Ne58f8fChklZ2LY9UdymN9PLd1eerEMacBjc3S6cx8uO9MjBM1h7w8VNXOYks2_rg8QpNQ-3a6R3HMrYkcf_LYsKXml8OlcM0ZFU9o7Zy6AG9-72A99nE3Bdv0zOMyJfIq5PVuuJ_aTPlhuz22134M_osUC3ldxEYhr5ve7438JwAA__9zRZe1">