compiledb icon indicating copy to clipboard operation
compiledb copied to clipboard

compile_commands.json overwritten with empty result if failed or empty result from make

Open ghost opened this issue 6 years ago • 1 comments

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

ghost avatar Mar 25 '19 10:03 ghost

A default-on option to abort on errors (at least for a specific Makefile/folder) would indeed appear to be sane.

RPCMoritz avatar Oct 19 '19 17:10 RPCMoritz