Inspecting the option parser and logger code, I think there is a lot we could do to make the parsing and logging process more robust/correct and less complicated:
[x] We should always escape spaces in the logger, so we do not need to deal with spaces in CodeChecker explicitly. It should be handled by shlex.split and other similar utilities.
[x] We should always have one single file for a build action (the logger already split multifile build actions, does intercep build do the same?). This way the BuildAction.sources could contain always at most one file. This would help us simplify a lot of code and also improve the detection of languages. One could have compiler invocations like gcc -c main.cpp foo.c. This way the compiler use different languages settings for both files. If we have source lists we cannot really determine the language settings correctly. If we have a single file for both actions, we can detect the language settings correctly.
[x] We should check how the compiler works if multiple sysroot is passed. Which one takes precedence? First? Last? This should be reflected by CodeChecker.
Inspecting the option parser and logger code, I think there is a lot we could do to make the parsing and logging process more robust/correct and less complicated:
shlex.split
and other similar utilities.gcc -c main.cpp foo.c
. This way the compiler use different languages settings for both files. If we have source lists we cannot really determine the language settings correctly. If we have a single file for both actions, we can detect the language settings correctly.