Hi Petr,
I did some work based on your latest revision. You could have a look at my calitko-petr-warnings branch.
I’m passing arguments.compilationCommand.split (' ') to doCompilation. Passing just the string doesn’t work on my machine - the error was that the path could not be found. I now think the reason might be the ''.
I reworked the code a little to use readline() instead of read(). I think that in one of the links you provided they said that the process will block if one writes a lot to a pipe but does not read from it. I’m now forwarding stdout of the subprocess to stderr and filtering only warning lines (i.e. lines containing “: warning:”). Only the lines not filtered are printed to the script’s stderr. The complete output from the subprocess is printed to the script’s stdout.
hasMatch() is not working correctly right now as it would not let bufferedLines accumulate more than one line but I’ll look into that.
What do you think?
Regards,
Peter
