Hi!
Some useful clang-diagnostic tools (like clang-tidy
and clang-check
) use compile_commands.json
for information about the building process, but it’s kind of complicated to generate them (although one can use bear or enhanced scan-build reimplementation). However, in the case of platformio it’s unnecessary because these tools also support specifying compile flags via compile_flags.txt
file. Its structure is very simple: just one flag per line. As we already can generate such a file for ccls
it’s pretty easy to implement (the file contents should be .ccls
without the first line specifying the compiler). I did some local testing and it seems to work.