Cannot include sonar.sources

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
    Github

I am experimenting with SonarCloud. I have a bare min project with 1 app.js file and a src folder that includes a 1 test.js file. I am trying to make the sonar.sources to be the src directory only and only cover that code. I included sonar-project.properties within my root dir like that

sonar.projectName=sonarQube
sonar.projectKey=afkhalid_sonarQube
sonar.sources=src

but it doesn’t work and I still get the code coverage for all code the app.js and test.js not test.js only

My project structure

SonarCloud still detects what is not in the src folder only

Hello Ahmed,

Welcome to the community support!

Thanks for using SonarCloud.

It seems you have enabled Autoscan which is the most convenient way to have your code analysed.
But AutoScan come with one important limitation considering your use case: it does not support coverage, yet.

Check this: https://sonarcloud.io/documentation/analysis/automatic-analysis/#current-limitations

Best.