4

I am trying to run Sonar Runner through CMD Line and want to scan all data through my Lcov file but after Running sonar Runner and it's showing Error in reading file .I crossed checked each and every path mentioned in file manually and its working fine.But still It's giving me the error as below:-

>INFO: Integration Test Coverage Sensor is started
INFO: Overall Coverage Sensor is started
INFO: Analysing [C:\Tests\lcov.dat]
INFO: Could not resolve 67 file paths in [C:\Trunk\lcov.dat], first unr
esolved path: C:\Trunk\Web\App_Themes\Core\AppStart\UserAuth.js"

I tried to run my Runner as below:-

>1>Go to Root directory of Project and Open CMD.

>2> C:\Sonar\Sonar_Runner\MSBuild.SonarQube.Runner.exe begin /k:"MobileJs" /n:"MobileJs" /v:"1.0" /d:"sonar.javascript.lcov.reportPath"=C:\Trunk\lcov.dat

>3>"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" /t:Rebuild

>4>C:\Sonar\Sonar_Runner\MSBuild.SonarQube.Runner.exe end

I followed each and every process given in the below link but did not get luck here. It's again and again giving me the same error in last step only while analyzing coverage.

Note:- LCOV file contained java script coverage report

Shian JA
  • 848
  • 4
  • 15
  • 52
  • Could you provide a minimal repro of this issue? Also, there should be a sonar-project.properties file in your .sonarqube\out folder next to your solution. Can you check if the unresolved JS files are in there or not? – Tamas Oct 04 '16 at 14:30
  • 2
    Looks like the root directory in which you go to at step #1 is not a children of "C:\Trunk\Web\App_Themes\Core\AppStart\UserAuth.js" - which would explain the issue. You probably generated the LCOV file from one directory and you are trying to run the analysis from another one. – Fabrice - SonarSource Team Oct 05 '16 at 11:25
  • @Fabrice-SonarSourceTeam - updated the question a bit please check – Shian JA Oct 06 '16 at 14:47
  • @Fabrice-SonarSourceTeam I have similar problem explained in https://stackoverflow.com/questions/51878860/sonarqube-and-lcov-report-could-not-resolve-file-paths Could you please see if you can help on it? – Murali Murugesan Aug 16 '18 at 14:02

0 Answers0