title: sonarQube displaying code coverage 0% in scala
body: <p>i am using <code>sonarQube-8.5.1.38104</code> and i am using it in my scala project and followed this <a href="https://sonar-scala.com/docs/setup/sbt-sonar/" rel="nofollow noreferrer">link</a>
  here is my <code>plugins.sbt</code> file</p>
  <pre><code>addSbtPlugin(&quot;org.scoverage&quot; % &quot;sbt-scoverage&quot; % &quot;1.6.1&quot;)
  
  addSbtPlugin(&quot;com.github.mwz&quot; % &quot;sbt-sonar&quot; % &quot;2.2.0&quot;)
  </code></pre>
  <p>and here is my <code>build.sbt</code> file</p>
  <pre><code>import sbtsonar.SonarPlugin.autoImport.sonarUseExternalConfig
  
  coverageEnabled := true
  
  sonarProperties ++= Map(
    &quot;sonar.host.url&quot; -&gt; &quot;http://127.0.0.1:9000&quot;,
    &quot;sonar.projectName&quot; -&gt; &quot;myproject-backend&quot;,
    &quot;sonar.projectKey&quot; -&gt; &quot;sonar-myproject-backend&quot;,
    &quot;sonar.sources&quot; -&gt; &quot;src/main/scala-2.13&quot;,
    &quot;sonar.tests&quot; -&gt; &quot;src/test/scala-2.13&quot;,
    &quot;sonar.junit.reportPaths&quot; -&gt; &quot;target/test-reports&quot;,
    &quot;sonar.sourceEncoding&quot; -&gt; &quot;UTF-8&quot;,
    &quot;sonar.scala.scoverage.reportPath&quot;-&gt;&quot;target/scala-2.13/scoverage-report/scoverage.xml&quot;,
    &quot;sonar.scala.scapegoat.reportPath&quot; -&gt; &quot;target/scala-2.13/scapegoat-report/scapegoat.xml&quot;
  )
  </code></pre>
  <p>followed <a href="https://github.com/scoverage/sbt-scoverage" rel="nofollow noreferrer">sbt-scoverage</a></p>
  <p>then i did
  -&gt; <code>sbt</code> -&gt; <code>coverage</code> -&gt; <code>test</code> -&gt; <code>coverageReport</code>
  generated the report</p>
  <pre><code>[info] Written Cobertura report [/home/user/git/myproject/target/scala-2.13/coverage-report/cobertura.xml]
  [info] Written XML coverage report [/home/user/git/myproject/target/scala-2.13/scoverage-report/scoverage.xml]
  [info] Written HTML coverage report [/home/user/git/myproject/target/scala-2.13/scoverage-report/index.html]
  [info] Statement coverage.: 38.67%
  [info] Branch coverage....: 31.58%
  </code></pre>
  <p>then i did</p>
  <blockquote>
  <p><code>sonarScan</code></p>
  </blockquote>
  <p>and check the report at <a href="http://127.0.0.1:9000/dashboard?id=myproject-backend" rel="nofollow noreferrer">http://127.0.0.1:9000/dashboard?id=myproject-backend</a></p>
  <p>then <strong>code coverage</strong> is displayed <strong>0.0%</strong> and <strong>Unit tests -</strong></p>
  <p>and i have checked the reports exists at</p>
  <pre><code>target/scala-2.13/scoverage-report/scoverage.xml
  target/scala-2.13/scapegoat-report/scapegoat.xml
  </code></pre>
  <p>and class test reports exists at</p>
  <pre><code>target/test-reports
  
  com.myproject.test.abctest.EventTest.xml               com.myproject.test.xyztest.FileUploadTest.xml  TEST-com.myproject.test.xyztest.DirectoryCreationTest.xml
  com.myproject.test.abctest.QueryEventTest.xml                TEST-com.myproject.test.abctest.InsertEventTest.xml   TEST-com.myproject.test.xyztest.FileUploadTest.xml
  com.myproject.test.xyztest.DirectoryCreationTest.xml  TEST-com.myproject.test.abctest.QueryEventTest.xml
  </code></pre>
  <p>why i am getting code coverage 0% then ? what am i missing here ? please guide ,thanks</p>