Using SVN with SonarScanner

Hello,

I am using SonarQube 8.9 and SonarScanner 4.7. To analyse the code in svn i am using the following code. And set SVN in the path variable also.

sonar-scanner
-Dsonar.projectKey=myproject
-Dsonar.sources=.
-Dsonar.scm.provider=svn
-Dsonar.scm.url=http://my.svn.server/repo/myproject/branches/mybranch
-Dsonar.scm.username=myuser
-Dsonar.scm.password=mypassword
-Dsonar.scm.revision=myrevision
-Dsonar.exclusions=filestoexclude

But SonarScanner is not checking out the source. Please guide.

Hey there.

You need to make sure the code already exists on the file system before executing the sonar-scanner. The SVN Integration just makes sure that the files can be “blamed”.

So just make sure you’ve done an svn checkout and that you start the scan from the root directory of your project.

Thank you