uartois / sonar-golang

Sonarqube plugin for the golang language.
GNU Lesser General Public License v3.0
245 stars 32 forks source link

sonar.go.tests.reportPaths can not support xml report #78

Open crystalyxiaoxianer opened 2 years ago

crystalyxiaoxianer commented 2 years ago

Description

sonar.go.tests.reportPaths can not support xml report [Description of the issue]

Steps to Reproduce

  1. execute unittest: go test ./... -mod=readonly -coverprofile=cover.out | go-junit-report > unittest.xml
  2. execute sonar scanning: sonar-scanner -Dsonar.go.tests.reportPaths=unittest.xml
  3. got a mistake: INFO: Sensor XML Sensor [xml] INFO: 1 source file to be analyzed WARN: Unable to analyse file file:///builds/shopee/ai-engine-platform/rcmdplt-rerank/unittest.xml; INFO: 1/1 source file has been analyzed

go version: 1.17.2 sonar-scanner: sonar-scanner-4.6.2.2472-linux sonarqube: 8.8