I am creating a POC to see if we can use SonarCloud on all of our projects. I have run into the below issue and any help will be really appreciated.
We integrated Sonarcloud with our Github Repo for Analysis to be done on per PR as well as entire code base. All the default rules are working. We want to be able to import external reports like Code coverage and various other linters. I’m unable to get it to work. Can you please advice on the steps to be followed?
I had used those pages and added properties to the .sonarcloud.properties file with no luck. We are using Heroku CI and the sonarcloud project is directly linked to Github. So it is doing automatic Analysis of each pull request.
On the guide pages, it says that external reports cannot be imported. Not sure if that is the case. https://sonarcloud.io/documentation/automatic-analysis/
I also wanted to check if you have a ticketing system where I can work with someone from the support team closely and resolve this issue?
Can you please let me know, if this is the correct flow?
Also we have a paid plan in which one of the repo is already being analyzed with Automatic Analysis. Will just deleting the sonarcloud.properties file in that repo allow me to Configure Analysis on the SonarCloud dashboard? I do not see that option currently at all for the project/repo that is already analyzed.
Where do I see the results of the external reports on the SonarCloud dashboard?
I’m importing rubocop report and eslint report using the sonar-project.properties. The reports are getting generated and the properties file has sonar.eslint.reportPaths=report.json and sonar.ruby.rubocop.reportPaths=rubocop-result.json.
Yes indeed, deleting this file will deactivate the automatic analysis.
When you configure import of external reports, you should see the “external” issues along with the other ones in the Issues page. If you don’t see any, this means that:
either your code is clean and you have no issue found by the external linters, kudos!
or you configuration in the sonar-project.properties file was not done correctly. In this case, you should look into the scanner logs to find if there are warnings about (for instance) JSON files not found. This will help you troubleshoot the situation.
Just wanted to thank you for your responses. They have been really helpful in pushing through this project.
As mentioned previously, I am using Github Action to post the per PR Analysis, https://github.com/marketplace/actions/sonarcloud-scan.
Seems like it runs as soon as the code is pushed to the PR and does not wait for SonarCloud to finish importing the code overage reports. How do I make the SonarCloud to post on the PR after the CI is done running the tests?
We are using Github and SonarCloud is one of the Authorized Github App.
On the SonarCloud dashboard -> Project -> Administration -> General Settings -> SCM is empty Pull Requests -> Integration with Github -> Repository Identifier is empty.