Using SonarLint out-of-the-box in VS2015

67 views
Skip to first unread message

ah.lu...@gmail.com

unread,
Aug 8, 2017, 2:33:32 AM8/8/17
to SonarLint
Hi,

I am new to SonarLint.  So I am now trying to set it up in my VS 2015 so that I can have it analyzing my codes.
After I install the SonarLint in my VS2015, without connecting it to any sonarqube server, I can see sometimes it works (I can see some warning messages with green squiggly lines), but sometimes it doesn't with the same project.
So I would like to know if it is really possible to use SonarLint out-of-the-box after installing the extension to VS2015 without binding to any sonarqube server?
Thanks.

valeri....@sonarsource.com

unread,
Aug 9, 2017, 7:42:14 AM8/9/17
to SonarLint
Hi,

SonarLint should work out or the box with Visual Studio 2015, without any additional configuration.

- What is the language of the files where the warnings are not shown - C# or JavaScript/C++?
- When the warnings are not shown, could you see if SonarLint is enabled (in Tools -> Extensions and updates)?

Thanks,
Valeri
Message has been deleted

ah lun

unread,
Aug 10, 2017, 3:35:40 AM8/10/17
to SonarLint
Hi Valeri,

I tested with VB.Net and C# projects, both have the same behavior, sometimes it work and sometimes not, and the Sonarlint extension is enabled.
I've also tried to compile the projects, and also tried to create a solution file for the projects (because normally I open the project by double clicking the .vbproj or .csproj), and the result still the same: Sometimes work sometimes not.
And sometimes I will need to wait for a while then it works, but not all the time it will work.
I hope my explanation doesn't sound confusing.

Thanks.

valeri....@sonarsource.com

unread,
Aug 10, 2017, 3:57:21 AM8/10/17
to SonarLint
Hi,

Visual Studio has a setting called "Enable full solution analysis" which runs the registered analyzers in the background for all projects in the current solution. In case of very large solution this could take significant time, thus showing the warnings much slower than usual. There is no actual benefit from this setting and it is better to be turned off, unless you know why you want to enable it. Here is how to disable it in your Visual Studio: click Tools -> Options, in the dialog select Text Editor -> C# -> Advanced, then on the right side find Enable Full Solution Analysis and uncheck it. The effect is that the background analysis will be active only for the open files and the response should be much faster.

I hope this helps,
Valeri

ah lun

unread,
Aug 10, 2017, 5:04:19 AM8/10/17
to SonarLint
Hi,

I've turned off this setting for both C# and Basic a while ago and it remains turned off, but it didn't help.

Thanks.
Reply all
Reply to author
Forward
0 new messages