compiledb
compiledb copied to clipboard
compile_commands.json overwritten with empty result if failed or empty result from make
I have a project with many Makefiles in sub folders I want to produce a single compile_commands.json for use with clang_tidy Traversing all of the Makefiles and outputting to the same compile_commands should work I think
But when compiledb is given a Makefile which does not produce anything or with an error - then the existing compile_commands.json is overwritten with an empty file - I would expect it to remain same as before.
Of course I could manually filter out those Makefiles, but I would prefer compiledb to work as expected here.
Cheers,
Daniel
A default-on option to abort on errors (at least for a specific Makefile/folder) would indeed appear to be sane.