Clang-tidy diagnostic-error on "catch2/catch_user_config.hpp"
First of all this is not a bug per se. After updating to use v3.0.1 of Catch2 within a project I am hitting an issue around header discoverability with clang-tidy. While running clang-tidy and after having exposed the headers folder to it I get the following diagnostic error:
third_party/Catch2/src/catch2/internal/catch_test_macro_impl.hpp:11:10: error: 'catch2/catch_user_config.hpp' file not found [clang-diagnostic-error]
This mainly comes from the fact that this header is generated (.in file) during compilation. Cannot find an easy way to workaround it without having to build Catch2 and redirect to the generated file which is a bit inconvenient. Any thoughts on if something can be done?
How are you running clang-tidy?
My understanding is that the recommended way to run it is to give it the compilation database as input, which should in turn contain the correct include paths to make the user config header visible.
Hey @horenmar,
Yes, before updating to v3 I was able to run it without the need of the compilation database. To conclude, managed to do it by generating the compilation database without any issues hence I will close this issue.