Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SonarLint provide any advantage over SonarAnalyzer.CSharp

On the SonarAnalyzer.CSharp Nuget Package it has the Description:

Analyzers which spot bugs and code smells in your code. This package is best used together with SonarLint for Visual Studio (http://vs.sonarlint.org) and/or the SonarQube platform (http://www.sonarqube.org).

I know that SonarLint is a plugin for VisualStudio, so its rule set would automatically get applied to every project opened in VisualStudio. But if I install the SonarAnalyzer.CSharp Nuget Package onto a project, would having SonarLint give me any more capabilities, or are they just two ways of providing the same Roslyn rules?

like image 734
Ayb4btu Avatar asked May 05 '18 23:05

Ayb4btu


People also ask

Does SonarLint work for c#?

SonarLint helps you detect and fix Bugs, Code Smells, and Security Vulnerabilities in-IDE. It supports C#, VB.NET, C, C++, JS, and TS.

What is SonarLint for Visual Studio?

SonarLint is a free IDE extension that locates security vulnerabilities while you're coding in your IDE. This includes Visual Studio, JetBrains, Eclipse, and Visual Studio Code.


2 Answers

SonarLint for Visual Studio adds the following functionality to SonarAnalyzer.CSharp (I could be missing minor features):

  • JavaScript, TypeScript and C/C++ support.
  • Background source code analysis - to be fair, adding the nuget will make your builds slower. When you use SonarLint instead of the nuget your local builds will not be slower.
  • Ability to "connect" a solution to a SonarQube server, which allows you to automatically sync rulesets and settings.
  • QualityGate pass/fail notifications within Visual Studio.
  • SonarLint is somewhat easier to update than the nuget and you could benefit from the latest fixes and improvements without much effort.

In general, the biggest benefit is that you will be able to analyze supported non-.NET languages in your solution and/or probably the slight performance improvement of the background analysis.

like image 171
Val Avatar answered Oct 02 '22 05:10

Val


Above all things, the full SonarLint for Visual Studio will add support for additional languages, while also offering the option to connect to SonarQube/SonarCloud (Connected Mode)

like image 35
Nicolas B. Avatar answered Oct 02 '22 06:10

Nicolas B.