ale icon indicating copy to clipboard operation
ale copied to clipboard

Parse split arguments from compile_commands.json

Open Nemo157 opened this issue 7 years ago • 1 comments

Current compile_commands.json parser only parses from the command string property. Using Bear to generate my compile_commands.json I instead have an arguments array of arguments, which is an alternative supported by the JSON Compilation Database format.

Also of note, my compile command is using split -I some/path arguments rather than -Isome/path. A quick hack of join(l:item.arguments, ' ') resulted in an invocation like clang [...] "-I/absolute/path some/path", I think the single string command parser also needs to be enhanced to correctly parse split arguments.

I may find some time to work on this in the next couple of weeks if no-one else does.

Nemo157 avatar Sep 18 '18 15:09 Nemo157

Sure, just add more tests for whatever it is you do. The only way to get something like this working for most projects is to just throw in tons of test cases until everything is covered.

w0rp avatar Sep 18 '18 15:09 w0rp