Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- how is SonarQube deployed: zip, Docker, Helm
- what are you trying to achieve
- what have you tried so far to achieve this
Sonarqube 10.5.1 Community
Deployed as zip on RHEL8
Sonarscanner.MSBuild.exe 6.2.0 (deployed to Windows 2019 with Visual Studio project)
Scanning of a DotNet Framework Web Application. It was ASP.Net Site, but have converted to a web application upon reading SonarScanner for .NET (sonarsource.com)
Project scans, and uploads a report. But it only shows lines of code for the web.config files. None of the .cs code files seem to show any lines of code (or issues)
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
At one point I can see it collecting all the files:
17:09:47.203 INFO: Base dir: E:\Users\xxxxx\Git\WS-DocServices\EMCDocServices-WebApp
17:09:47.204 DEBUG: Source paths: Properties/AssemblyInfo.cs, Service.asmx, ServiceV2.asmx, ServiceV2WNZL.asmx, Web References/RetrievePDF/Reference.map, Web.config, Web References/Audit/Reference.map, Web References/Logon/Reference.map, Web References/Logon/UserObj.datasource, App_Code/Service.cs, App_Code/ServiceV2.cs, App_Code/ServiceV2WNZL.cs, App_Code/Util.cs, App_Code/Classes/ContentInfo.cs, App_Code/Classes/DataAccess.cs, App_Code/Classes/DocTypeSchema.cs, App_Code/Classes/EMCConnectionException.cs, App_Code/Classes/OperationStatus.cs, App_Code/Classes/SearchResult.cs, App_Code/Classes/UserData.cs, Properties/Settings.settings, Web References/Audit/Audit.disco, Web References/Logon/Logon.disco, Web References/RetrievePDF/Service.disco, Web References/Logon/Logon.wsdl, Web References/RetrievePDF/Service.wsdl, packages.config, Web References/Audit/Audit.wsdl, Web.Debug.config, Web.Release.config
17:09:47.205 INFO: Excluded sources: sonar_scan_bin.sh, sonar_scan_sbin.sh
17:09:47.231 DEBUG: 'Properties/AssemblyInfo.cs' generated metadata with charset 'UTF-8'
17:09:47.237 DEBUG: 'Properties\AssemblyInfo.cs' indexed with language 'cs'
17:09:47.243 DEBUG: 'Service.asmx' indexed with no language
17:09:47.244 DEBUG: 'ServiceV2.asmx' indexed with no language
17:09:47.245 DEBUG: 'ServiceV2WNZL.asmx' indexed with no language
17:09:47.246 DEBUG: 'Web References\RetrievePDF\Reference.map' indexed with no language
17:09:47.246 DEBUG: 'Web.config' indexed with language 'xml'
17:09:47.247 DEBUG: 'Web References\Audit\Reference.map' indexed with no language
17:09:47.248 DEBUG: 'Web References\Logon\Reference.map' indexed with no language
17:09:47.250 DEBUG: 'Web References\Logon\UserObj.datasource' indexed with no language
17:09:47.251 DEBUG: 'App_Code\Service.cs' indexed with language 'cs'
17:09:47.251 DEBUG: 'App_Code\ServiceV2.cs' indexed with language 'cs'
17:09:47.252 DEBUG: 'App_Code\ServiceV2WNZL.cs' indexed with language 'cs'
17:09:47.252 DEBUG: 'App_Code\Util.cs' indexed with language 'cs'
17:09:47.253 DEBUG: 'App_Code\Classes\ContentInfo.cs' indexed with language 'cs'
17:09:47.253 DEBUG: 'App_Code\Classes\DataAccess.cs' indexed with language 'cs'
17:09:47.254 DEBUG: 'App_Code\Classes\DocTypeSchema.cs' indexed with language 'cs'
17:09:47.255 DEBUG: 'App_Code\Classes\EMCConnectionException.cs' indexed with language 'cs'
17:09:47.255 DEBUG: 'App_Code\Classes\OperationStatus.cs' indexed with language 'cs'
17:09:47.256 DEBUG: 'App_Code\Classes\SearchResult.cs' indexed with language 'cs'
17:09:47.256 DEBUG: 'App_Code\Classes\UserData.cs' indexed with language 'cs'
17:09:47.257 DEBUG: 'Properties\Settings.settings' indexed with no language
17:09:47.259 DEBUG: 'Web References\Audit\Audit.disco' indexed with no language
17:09:47.260 DEBUG: 'Web References\Logon\Logon.disco' indexed with no language
17:09:47.262 DEBUG: 'Web References\RetrievePDF\Service.disco' indexed with no language
17:09:47.262 DEBUG: 'Web References\Logon\Logon.wsdl' indexed with no language
17:09:47.263 DEBUG: 'Web References\RetrievePDF\Service.wsdl' indexed with no language
17:09:47.264 DEBUG: 'packages.config' indexed with language 'xml'
17:09:47.265 DEBUG: 'Web References\Audit\Audit.wsdl' indexed with no language
17:09:47.265 DEBUG: 'Web.Debug.config' indexed with language 'xml'
17:09:47.265 DEBUG: 'Web.Release.config' indexed with language 'xml'
And skipping over some generated Web References - which I’m ok with. But when it lists what it has scanned:
17:09:48.522 INFO: 4 source files to be analyzed
17:09:48.526 DEBUG: 'Web.Debug.config' generated metadata with charset 'UTF-8'
17:09:48.740 DEBUG: Count lines in file:///E:/Users/xxxxx/Git/WS-DocServices/DocServices-WebApp/Web.Debug.config
17:09:48.840 DEBUG: 'packages.config' generated metadata with charset 'UTF-8'
17:09:48.844 DEBUG: Count lines in file:///E:/Users/xxxxx/Git/WS-DocServices/DocServices-WebApp/packages.config
17:09:48.867 DEBUG: 'Web.Release.config' generated metadata with charset 'UTF-8'
17:09:48.870 DEBUG: Count lines in file:///E:/Users/xxxxx/Git/WS-DocServices/DocServices-WebApp/Web.Release.config
17:09:48.910 DEBUG: 'Web.config' generated metadata with charset 'UTF-8'
17:09:48.922 DEBUG: Count lines in file:///E:/Users/xxxxx/Git/WS-DocServices/DocServices-WebApp/Web.config
17:09:48.999 INFO: 4/4 source files have been analyzed
17:09:49.000 INFO: Sensor XML Sensor [xml] (done) | time=488ms
17:09:49.000 INFO: Sensor JaCoCo XML Report Importer [jacoco]
17:09:49.002 INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
17:09:49.004 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
17:09:49.004 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
17:09:49.004 INFO: Sensor IaC Docker Sensor [iac]
17:09:49.013 INFO: 0 source files to be analyzed
17:09:49.165 INFO: 0/0 source files have been analyzed
It’s only the web config files, none of the actual source.
This isn’t the entire console log. And I have chopped bits out of it, where I think the relevant bits are.