Hi All,
I have coverage.out and report.json file in the project root directory, I made sure of it.
This is how my sonar-project properties look like
sonar.projectKey=<company name_github repo name>
sonar.organization=<company name>
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=<github repo name>
sonar.projectVersion=1.0
# Mono repo setting
sonar.project.monorepo.enabled=true
sonar.sources=.
sonar.exclusions=**/*_test.go
sonar.tests=.
sonar.test.inclusions=**/*_test.go
# Code Coverage path
sonar.go.coverage.reportPaths=**/coverage.out
sonar.go.tests.reportPaths=test-data-creation/report.json
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
my github workflow CI build.yml
name: SonarCloud CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build run log
INFO: Sensor Code Quality and Security for Go [go]
[76](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:77)INFO: Sensor Code Quality and Security for Go is restricted to changed files only
[77](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:78)INFO: 0 source files to be analyzed
[78](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:79)INFO: 0/0 source files have been analyzed
[79](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:80)INFO: Sensor Code Quality and Security for Go [go] (done) | time=42ms
[80](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:81)INFO: Sensor Go Unit Test Report [go]
[81](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:82)INFO: Sensor Go Unit Test Report [go] (done) | time=54ms
[82](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:83)INFO: Sensor Go Cover sensor for Go coverage [go]
[83](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:84)INFO: Load coverage report from '/github/workspace/test-data-creation/coverage.out'
[84](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:85)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/config/config.go' is not included in the project, ignoring coverage
[85](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:86)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/profanity/profanity.go' is not included in the project, ignoring coverage
[86](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:87)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/generator/fake_generator.go' is not included in the project, ignoring coverage
[87](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:88)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/jsonreader/jsonreader.go' is not included in the project, ignoring coverage
[88](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:89)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/cmd/test-data-creation/main.go' is not included in the project, ignoring coverage
[89](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:90)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/generator/age_generator.go' is not included in the project, ignoring coverage
[90](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:91)WARN: File 'github.com/<company_name>/<repo_name>/test-data-creation/internal/common/common.go' is not included in the project, ignoring coverage
[91](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:92)INFO: Sensor Go Cover sensor for Go coverage [go] (done) | time=29ms
[92](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:93)INFO: Sensor IaC Docker Sensor [iac]
[93](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:94)INFO: Sensor IaC Docker Sensor is restricted to changed files only
[94](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:95)INFO: 0 source files to be analyzed
[95](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:96)INFO: 0/0 source files have been analyzed
[96](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:97)INFO: Sensor IaC Docker Sensor [iac] (done) | time=107ms
[97](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:98)INFO: Sensor TextAndSecretsSensor [text]
[98](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:99)INFO: Sensor TextAndSecretsSensor is restricted to changed files only
[99](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:100)INFO: Available processors: 2
[100](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:101)INFO: Using 2 threads for analysis.
[101](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:102)INFO: 4 source files to be analyzed
[102](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:103)INFO: 4/4 source files have been analyzed
[103](https://github.com/<company_name>/<repo_name>/actions/runs/9102625700/job/25022683224?pr=543#step:4:104)INFO: Sensor TextAndSecretsSensor [text] (done) | time=598ms
Someone please take a look and let me know what is the mistake I am doing