8

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?

Ayb4btu
  • 3,208
  • 5
  • 30
  • 42

2 Answers2

7

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.

Val
  • 1,920
  • 1
  • 11
  • 14
  • What are QualityGate notifications? – Ayb4btu May 08 '18 at 02:00
  • @Ayb4btu when your solution is connected to a SonarQube instance and the CI causes the quality gate to fail you will see a little popup near the VS status bar. It requires SonarQube developer edition, though: https://redirect.sonarsource.com/editions/developer.html – Val May 08 '18 at 07:13
1

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)

Nicolas B.
  • 7,245
  • 17
  • 29