Sonar issue in community edition for code coverage

Our application is based on go language. We are currently using the go test to get the coverage through test cases in the pipeline itself.

Cde coverage is showing zero as you can see in the image below.

  • List item

We are using docker build for all componenets in the application and its not possible to change build procedure now. Even updating the sonar properties in Build Yaml file to include the test properties is also not working

sonar.exclusions=**/xxx /**

sonar.test.inclusions=**/*_test.go,**/test/**

sonar.go.tests.reportPaths=coverage.out

Our sample test method is below:

go test

- script: |

    go test -coverprofile cover.out

    go tool cover -html=cover.out -o cover.html 

  workingDirectory: '$(System.DefaultWorkingDirectory)/backendservices/customer/api-main-folder/api'

  displayName: 'Run unit test'

Ask: If anyone can help to generate the .html or coverage file from the output of test yaml task, it would be really helpful as we cannot move forward

Hi @Aakanksha_Aakanksha

Welcome to SonarSource Community! :sonarsource:

Please see our Community Guide: [Coverage & Test Data] Generate Reports for Apex, C/C++, Objective-C, Go, JS/TS and Python

Joe