I modified the way how the sonar-scanner childprocess is invoked from the plugin to get real-time output.
Instead of starting a process, wait for it's unified stdout & stderr and printing it, the process's stdout and stderr can be set to os.Stdout; this way the scanner writes to that channel instantly and it's not necessary to wait for the child to terminate to get output.
The only difference in the output is that the first line of the scanner's output is not displayed in the same line as "==> Code Analysis Result:", but appears in the next line instead.
The redirection of sonar-scanner's stderr to os.Stderr seems to behave exactly like if it was written to os.Stdout, the content appears on the web console instantly.
I modified the way how the sonar-scanner childprocess is invoked from the plugin to get real-time output. Instead of starting a process, wait for it's unified stdout & stderr and printing it, the process's stdout and stderr can be set to os.Stdout; this way the scanner writes to that channel instantly and it's not necessary to wait for the child to terminate to get output. The only difference in the output is that the first line of the scanner's output is not displayed in the same line as "==> Code Analysis Result:", but appears in the next line instead.