sonar-scanner invokation modified to get real-time output
This commit is contained in:
parent
15157105c5
commit
529326ba41
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
@ -51,10 +52,10 @@ func (p Plugin) Exec() error {
|
||||
|
||||
cmd := exec.Command("sonar-scanner", args...)
|
||||
// fmt.Printf("==> Executing: %s\n", strings.Join(cmd.Args, " "))
|
||||
output, err := cmd.CombinedOutput()
|
||||
if len(output) > 0 {
|
||||
fmt.Printf("==> Code Analysis Result: %s\n", string(output))
|
||||
}
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stdout
|
||||
fmt.Printf("==> Code Analysis Result:\n")
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user