Automatic Analysis has been configured, the project is javascript. here is .sonarcloud.properties
# Path to sources
sonar.sources=src
sonar.exclusions=_old
#sonar.inclusions=
# Path to tests
sonar.tests=test
#sonar.test.exclusions=
#sonar.test.inclusions=
# Source encoding
#sonar.sourceEncoding=UTF-8
# Exclusions for copy-paste detection
#sonar.cpd.exclusions=
our main branch in github and in sonarcloud is the same. we’ve made several merges into the branch since adding sonarcloud and it has been 2 days and still it says The main branch has no lines of code. Oddly the branches are all being scanned properly and show code on them. The only one with the issue is the main develop branch.
Could you share the id of the background task that corresponds to a master analysis?
You can do this by navigating to Administration > Background tasks on the project overview page of your project on SonarCloud.
I am sorry for the delay in getting back to you. The support on this community forum works on a best-effort principle.
That being said we have been investigating your problem, and having a reproducer project would help us a lot. Would it be possible for you to create a small project that demonstrates this issue and share it with us?
@TomVanBraband I’m probably just going to have to switch it to manual at this point unfortunately.
some other troubleshooting measures I tried
disable and re-enable automatic analysis. no change.
comment out the “test” area of sonarcloud.properties. no change.
scan the project manually. this made the develop branch appear in sonarcloud, but next time automatic analysis ran it went back to “The main branch has no lines of code.”
We can tell from the logs on our end that the Typescript version that is used to analyze your project is outdated. This is likely due to some configuration specific to your project and I would like to understand this issue better, for which a reproducer project would be helpful.
@TomVanBraband also what is weird is why do the pull requests analyze properly though? if typescript was the issue wouldn’t that fail on the pull requests then too? our version is not that old, 3.6.3
@nwsparks Ok, that version of TypeScript should not cause problems at all.
Could you share with me the ID of a background task corresponding to the analysis of a pull request?
To be clear, we only invoke Automatic Analysis for the default branch of your project and for pull requests. It is currently not possible to have other branches analyzed by Automatic Analysis.
I can see the same errors when an analysis is triggered for your pull request. Do all the files in your repository show up when you navigate to your PR on SonarCloud and click on the Code tab?
Would it be possible to share your tsconfig.json (it is possible in a private thread)?
@TomVanBraband interesting. How can I start a private thread? Our tsconfig looks fairly generic so I’ll share it here…If I go to the code tab on both develop and PR I am able to view the files, screenshot from develop: