A few extra steps are needed for SonarCloud to analyze your code coverage

I’m trying to setup code coverage on sonarcloud, I followed every step in here

But somehow, in action of github, it show correct


But in the sonarCloud, it remain the same message “A few extra steps are needed for SonarCloud to analyze your code coverage”

My sonarcloud.properties:

sonar.organization=khanh21011999

This is the name and version displayed in the SonarCloud UI.
sonar.projectName=testUnitTest
sonar.projectVersion=1.0

Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=./sonar-project.properties
sonar.exclusions=android/**
Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.coverage.exclusions=__mocks__/**,src/types/**
sonar.tests=__TEST__
sonar.test.inclusions=__TEST__/**```

Hey there.

You’ve set a lot of properties you probably don’t need to (and set them incorrectly). The only one relevant to code coverage is sonar.javascript.lcov.reportPaths. How about you try removing all the others (sonar.sources, sonar.sourceEncoding, sonar.tests and sonar.tests.inclusions) and see if the error goes away?

If not, look for scanner logs like this:

INFO: Sensor JavaScript/TypeScript Coverage [javascript]

Hello,

sonar.sources should be path of your source files, example src/ not path of sonar-project.properties file.
Reference: Narrowing the Focus | SonarQube Docs

Hi @Colin, i am having the same issue. My sonar-project.properties file is very straight forward. Can you help?

sonar.projectKey=myorg_key
sonar.organization=myorg
sonar.sources=.
sonar.javascript.lcov.reportPaths=./apps/webapp/coverage/lcov.info,./apps/earnings/coverage/lcov.info,./packages/helpers/coverage/lcov.info,./packages/design-system/coverage/lcov.info