How to run Sonar-CSharp Analyzer

724 views
Skip to first unread message

Hijas Ahmed

unread,
Nov 20, 2017, 4:43:04 AM11/20/17
to SonarLint
Earlier I used "https://github.com/SonarSource/sonaranalyzer-dotnet" Sonar-CSharp project. There is a SonarAnalyzer.Scanner which can run the analyzer. Now it says it is deprecated and moved it to "https://github.com/SonarSource/sonar-csharp" location.

But in there I am unable to find the exact position to run the analyzer.

Can anyone help me to sort this out.

Amaury Leve

unread,
Nov 20, 2017, 4:49:13 AM11/20/17
to Hijas Ahmed, SonarLint
Hi Hijas,

The analyzer (roslyn based) is located into the sonaranalyzer-dotnet folder of the sonar-csharp GitHub repository. You should use the SonarAnalyzer.sln solution (the others are for later use).

Cheers,
Amaury

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/c9332109-fe8d-4452-89d7-de9e44868239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Amaury Levé | SonarSource

Software Developer - .Net Team

http://sonarsource.com


Are you using SonarLint in your IDE? 

Hijas Ahmed

unread,
Nov 20, 2017, 5:22:29 AM11/20/17
to SonarLint
Hi Amaury,

Thank you for the reply.

I can not find the SonarAnalyzer.Scanner module within sonaranalyzer-dotnet folder.
My purpose is to invoke Sonar analyzer for C# from command line.


Thanks & Regards,
Hijas

Amaury Leve

unread,
Nov 20, 2017, 6:54:58 AM11/20/17
to Hijas Ahmed, SonarLint
I guess you are talking about the Scanner for MSBuild? If so the GitHub is here: https://github.com/SonarSource/sonar-scanner-msbuild and the documentation (and download) here: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild


For more options, visit https://groups.google.com/d/optout.

Hijas Ahmed

unread,
Nov 20, 2017, 8:24:48 AM11/20/17
to SonarLint
I need to run this without connecting to SonarQube. Scanner for MSBuild require SonarQube connection.

Thanks &  Regards,
Hijas

Amaury Leve

unread,
Nov 20, 2017, 11:09:36 AM11/20/17
to Hijas Ahmed, SonarLint
I am not sure to understand your request. The analyzer is shipped through a NuGet package (SonarAnalyzer.CSharp) or through a Visual Studio extension (SonarLint) for the standalone mode. Then you will need to use the Scanner for MSBuild to get an integration with your SonarQube instance.


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages