SonarQube is a really great solution to monitor and track your technical debt over time. But wouldn’t it be great if the developer could already see in Visual Studio the impact that his commit will have to the sonar dashboard? If you use Visual Studio 2015 and the C# Plugin for SonarQube you can do this with the extension SonarLint.
The extension depends on the latest version of the C# Plugin – so make sure that you have the latest version (5.2) installed.
In Visual Studio install the extension in the “Extensions and Updated” dialog.
This adds a new Tile ‘SonarQube’ to your Team Explorer.
You can use this tile to connect to your SonarQube instance.
Once connected you can bind your current solution to a project from the SonarQube instance.
Now all the Errors and Warnings from your SonarQube project will show up in the error window in Visual Studio.
SonarLint uses Roslyn to perform the analysis so that you can use all tooling that you get from the roslyn compiler. You can suppress the message from within the code if you like.
You also can leverage the new features from the static code analysis in Visual Studio like only showing messages for the changed documents.
So that’s it. A really small extension with a very big impact. I’ve always been a big fan the FxCopy and the static code analysis – But I’ve always missed a central point to manage the rules and to monitor the output over time. SonarQube is perfect for that – but without a Visual Studio integration it was not a complete solution. SonarLint closes that gap and integrates the Visual Studio toolchain perfectly with SonarQube.