Generate compile.json from the bazel build for clang-tidy
Description
Needs to replace this being generated by cmake
Suggested Solution
No response
Additional Context
No response
I can take this
Does clang-tidy need to run in the sandbox from bazel? I wonder if the compile.json will point to files that are removed when the sandbox is cleaned up.
@QuantamHD suggests https://github.com/hedronvision/bazel-compile-commands-extractor
Whenever I tried, I never had good experience with the hedronvision tool.
I'll built something with bant that works pretty well, and is maintained by someone close to the team.
Probably this weekend.
https://bazel.build/install/ide#autocomplete-for-source-code has additional options.
Though if this is only for clang-tidy, then something like: https://github.com/erenon/bazel_clang_tidy
can be used without needing a compile.json file.
It is only for clang_tidy afaik.
I also use the compilation DB for support for clangd, this is why I prefer using bant to create a compilation DB.
Also, if we use our clang-tidy script, it has more sophisticated caching than what bazel can provide, so it is also nicer.
I have a week of vacation now, so I might get to it.