The main branch has no lines of code. - C#

Must-share information (formatted with Markdown):

Please help me out in this, Project is in C# language.

After using Sonarscanner it is showing message in above images

Hi,

Welcome to the community!

What version of SonarQube are you using?

 
Ann

Hey Ann,

Thank You.

SonarQube Server Version 7.9.2 (build 30863)

Thanks
Anuj

Hi Anuj,

You have run an analysis, right? And if so, did it complete successfully? Because off-hand this looks to me like a project that has been provisioned but not yet analyzed.

 
Ann

Hey Ann,

I am beginner to SonarQube. I hope by Analysis you meant those commands of Sonarscanner.

Yes, Below is the log from console.
3 Commands of SonarScanner used them as it is.

SonarScanner.MSBuild.exe end
SonarScanner for MSBuild 4.7.1
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TestComplianceFilter.exe.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TestComplianceFilter.exe.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TFComplianceSDNLibrary.dll.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TFComplianceSDNLibrary.dll.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TFSDNDetailsScanner.dll.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TFSDNDetailsScanner.dll.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TestComplianceFilter.exe.RoslynCA_fixed.json
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: <>\Output-TFSDNService\TestComplianceFilter.exe.RoslynCA_fixed.json
WARNING: File <>\TFComplianceSDNService\Properties\PublishProfiles\Local_Pubish.pubxml’ does not exist.
WARNING: File ‘<>\TFComplianceSDNService\Properties\PublishProfiles\SMS_001.pubxml’ does not exist.
WARNING: File ‘<>\TFComplianceSDNService\Properties\PublishProfiles\TFSMS.pubxml’ does not exist.
Calling the SonarQube Scanner…
INFO: Scanner configuration file: C:\GitRepo\Tools\SonarQube\sonar-scanner-4.1.0.1829\bin..\conf\sonar-scanner.properties
INFO: Project root configuration file:
<>.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 4.1.0.1829
INFO: Java 12.0.2 Oracle Corporation (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\anuj.saxena.sonar\cache
INFO: SonarQube server 7.9.2
INFO: Default locale: “en_IN”, source code encoding: “windows-1252” (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=1603ms
INFO: Server id: BF41A1F2-AXBmDqAW0Rcfl44q0oEw
INFO: User cache: C:\Users\anuj.saxena.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=992ms
INFO: Load/download plugins (done) | time=1119ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=10ms
INFO: Project key: TFLSE-Server-Master
INFO: Base dir: <>
INFO: Working dir: <>.sonarqube\out.sonar
INFO: Load project settings for component key: ‘TFLSE-Server-Master’
INFO: Load project settings for component key: ‘TFLSE-Server-Master’ (done) | time=935ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=1096ms
INFO: Load active rules
INFO: Load active rules (done) | time=30724ms
INFO: Indexing files…
INFO: Project configuration:
WARN: null
INFO: Indexing files of module ‘TFComplianceSDNService’
INFO: Base dir: <>\TFComplianceSDNService
INFO: Source paths: <>, ITFComplianceSDNServiceImpl.cs, Prope…
INFO: Indexing files of module ‘TFSDNDetailsScannerTest’
INFO: Base dir: <>TFSDNDetailsScannerTest
INFO: Test paths: Program.cs, Properties/AssemblyInfo.cs, App.config
INFO: Indexing files of module ‘TFSDNDetailsScanner’
INFO: Base dir: <>\TFSDNDetailsScanner
INFO: Source paths: BusinessLogic/DateAnalyser.cs, BusinessLogic/TFSDNHandle/OFAC…
INFO: Indexing files of module ‘TFSDNScannerLibrary’
INFO: Base dir: <>\TFSDNScannerLibrary
INFO: Source paths: TFAlgo/DamerauLevenshteinAlgorithm.cs, TFAlgo/LevenshteinAlgo…
INFO: Indexing files of module ‘TFSDNScannerLibraryTest’
INFO: Base dir:
<>\TFSDNScannerLibraryTest
INFO: Test paths: ForeignNames.cs, Program.cs, Properties/AssemblyInfo.cs, WhiteL…
INFO: Indexing files of module ‘TFLSE-Server-Master’
INFO: Base dir: <>
INFO: 68 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for cs: Sonar way
INFO: ------------- Run sensors on module TFSDNDetailsScannerTest
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=1051ms
WARNING: WARNING: An illegal reflective access operation has occurred
WARNING: WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/anuj.saxena/.sonar/cache/866bb1adbf016ea515620f1aaa15ec53/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain)
WARNING: WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: WARNING: All illegal access operations will be denied in a future release
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
INFO: Sensor C# Properties [csharp]
WARN: No Roslyn issues report found for this project.
INFO: Sensor C# Properties [csharp] (done) | time=2ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: ------------- Run sensors on module TFSDNScannerLibraryTest
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor C# Properties [csharp]
WARN: Analyzer working directory does not exist:
‘<>.sonarqube\out\2\output-cs’. Analyzer results won’t be loaded from this directory.
WARN: Analyzer working directory does not exist:
‘<>.sonarqube\out\6\output-cs’. Analyzer results won’t be loaded from this directory.
INFO: Sensor C# Properties [csharp] (done) | time=4ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: ------------- Run sensors on module TFComplianceSDNService
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor C# Properties [csharp]
WARN: Property missing: ‘sonar.cs.analyzer.projectOutPaths’. No protobuf files will be loaded for this project.
WARN: No Roslyn issues report found for this project.
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=21ms
INFO: ------------- Run sensors on module TFSDNDetailsScanner
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor C# Properties [csharp]
WARN: Analyzer working directory does not exist:
‘<>.sonarqube\out\4\output-cs’. Analyzer results won’t be loaded from this directory.
INFO: Sensor C# Properties [csharp] (done) | time=2ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=0ms
INFO: ------------- Run sensors on module TFSDNScannerLibrary
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor C# Properties [csharp]
WARN: Analyzer working directory does not exist:
‘<>.sonarqube\out\3\output-cs’. Analyzer results won’t be loaded from this directory.
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=0ms
INFO: ------------- Run sensors on module TFLSE-Server-Master
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor C# [csharp]
INFO: Importing 3 Roslyn reports
INFO: Load project repositories
INFO: Load project repositories (done) | time=1088ms
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1031 was not found in the SARIF report, assuming default severity
WARN: Rule CS1026 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1031 was not found in the SARIF report, assuming default severity
WARN: Rule CS1026 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1031 was not found in the SARIF report, assuming default severity
WARN: Rule CS1026 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1031 was not found in the SARIF report, assuming default severity
WARN: Rule CS1026 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1525 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1525 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
WARN: Rule CS1525 was not found in the SARIF report, assuming default severity
WARN: Rule CS1003 was not found in the SARIF report, assuming default severity
INFO: Sensor C# [csharp] (done) | time=1371ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=5ms
WARN: Invalid character encountered in file
<>/Metaphone3Algorithm.cs at line 505 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’.
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 685ms, dir size=831 KB
INFO: Analysis report compressed in 1050ms, zip size=169 KB
INFO: Analysis report uploaded in 2191ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://172.225.121.6:9000/dashboard?id=TFLSE-Server-Master
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://172.225.121.6:9000/api/ce/task?id=AXNsm_1ERBEfZgF99Li6
INFO: Analysis total time: 43.750 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 49.451s
INFO: Final Memory: 13M/44M
INFO: ------------------------------------------------------------------------
The SonarQube Scanner has finished
19:53:54.814 Post-processing succeeded.

Hi,

Assuming the activity graph at the top of your post is from the same project, then it’s clear that analysis has taken place.

Do you see anything interesting in your browser’s developer tools?

 
Ann

Yes I do, and activity graph is of same project.
image
I am not able to make connection whether it is because of this or not.

Anuj.

This issue is resolved now.
I was using an older version of MSBuild.
I upgraded it and Analysis started to be visible on SonarQube Server

Thank You Ann for your time.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.