SonarLint does not perform analysis on build

2,127 views
Skip to first unread message

panucci...@gmail.com

unread,
Apr 28, 2017, 2:37:02 AM4/28/17
to SonarLint
I would like SonarLint to perform Code Analysis on build, and I have enabled this at the project level







And I have turned on all the rules in the ruleset file








And yet I can't see any warnings in the error list. The only problems which show up in the error list are from the files which I currently have open.

Any ideas?

Amaury Leve

unread,
Apr 28, 2017, 3:19:30 AM4/28/17
to panucci...@gmail.com, SonarLint
Hi panuccio,

Which version of SonarLint for VS are you using? Are you using the connected mode or unconnected mode? Have you activated all the rules in the ruleset file in the SonarQube folder or only on some projects?

Cheers,
DotNet Team

--
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/0cd59547-dbc8-4a19-906c-3536b1f74c87%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? 

Vince Panuccio

unread,
Apr 28, 2017, 5:54:19 AM4/28/17
to Amaury Leve, SonarLint
I downloaded SonarLint 2 days ago to give it a go, so whatever version that is :) Sorry I can't tell you right now as I'm not at work.

I'm using it with VS2017 and I haven't connected it to SonarQube. As you can see from my screenshot, I have enabled all of the rules and also enabled code analysis on build and nothing is showing up in the Error List. Yet, when I open up a file in the project which I know has a problem, it shows up in the Error List as a warning.

On 28 April 2017 at 17:19, Amaury Leve <amaur...@sonarsource.com> wrote:
Hi panuccio,

Which version of SonarLint for VS are you using? Are you using the connected mode or unconnected mode? Have you activated all the rules in the ruleset file in the SonarQube folder or only on some projects?

Cheers,
DotNet Team

On Fri, Apr 28, 2017 at 8:37 AM <panucci...@gmail.com> wrote:
I would like SonarLint to perform Code Analysis on build, and I have enabled this at the project level







And I have turned on all the rules in the ruleset file








And yet I can't see any warnings in the error list. The only problems which show up in the error list are from the files which I currently have open.

Any ideas?

--
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+unsubscribe@googlegroups.com.

janos....@sonarsource.com

unread,
May 1, 2017, 4:16:24 AM5/1/17
to SonarLint, amaur...@sonarsource.com, panucci...@gmail.com
Hi,

Would you like to analyze all source files in the solution, even the ones not open in the editor? SonarLint for Visual Studio doesn't have that feature yet. It only analyzes files when you open them and as you make changes. Other flavors of SonarLint (IntelliJ and Eclipse) have that feature, and so this might be added for Visual Studio as well at some point, but there are no concrete plans at the moment.

Cheers,
Janos

janos....@sonarsource.com

unread,
May 1, 2017, 5:00:04 AM5/1/17
to SonarLint, amaur...@sonarsource.com, panucci...@gmail.com
Oops, I was completely wrong. We do have this feature. If you right-click on the solution and Rebuild the project, all the issues in the source code of the project should show up in the Error List. Does that work for you?

panucci...@gmail.com

unread,
May 1, 2017, 7:14:36 PM5/1/17
to SonarLint, amaur...@sonarsource.com, panucci...@gmail.com
No it doesn't work. Hopefully this one screenshot sums it up. I have it enabled for the project with all SonarLint rules enabled and as you can see, only the file which is open (DiamondService.cs) is showing errors in the Error List

panucci...@gmail.com

unread,
May 2, 2017, 8:24:30 PM5/2/17
to SonarLint, amaur...@sonarsource.com, panucci...@gmail.com
Hi,

I managed to get the rules working but I don't think what I did can be considered a fix.


I added SonarAnalyzer.CSharp.dll from the plugin directory C:\Users\vince\AppData\Local\Microsoft\VisualStudio\15.0_4c4d503d\Extensions\jsoufyx4.1y2

Hardly an ideal solution, but all of the rules fired as expected. I hope this helps.


On Monday, 1 May 2017 19:00:04 UTC+10, janos....@sonarsource.com wrote:

sander....@gmail.com

unread,
Jun 8, 2018, 3:10:14 PM6/8/18
to SonarLint
Hi all,
wow, this thread is quite old, but the issue is still the same. I couldnt find any other reports of that type.

Anybody got any update on this meanwhile? SonarLint got so many issues, I find it hard to use.

It not only doesnt run during build together with Visual Studio Code Analysis as reported here, it also

- still reports hidden or disabled rules on open files (thats a complete no go, making me want to uninstall it right away)
- doesnt integrate well with VS code analysis rules as an update of rules from server creates a mess within my 50+ projects because it keeps adding new ruleset files

panucci...@gmail.com

unread,
Jun 11, 2018, 12:08:55 AM6/11/18
to SonarLint
SonarLint is now a visual studio extension so it's no longer an issue.

sander....@gmail.com

unread,
Jun 11, 2018, 2:33:09 AM6/11/18
to SonarLint
Yes, im using the extension, the issues are all there...
Reply all
Reply to author
Forward
0 new messages