I have heard about the sonar source that manage source code quality. I have VS-2015. I have installed Sonar extension in VS (SonarLint) but not to know how to use that. I mean i add the extension in VS which is enabled. My local site is hosted in IIS server so that i don't need to Build + compile and run it on VS. also tell me that is it necessary to use SonarQube with SonarLint ?. if yes than why?
Related
I have installed Sonar Lint Extension for Visual Studio 2019 and according to the project i am working it is not required to fix the Code Smell Violations.
So is there a way that i can ignore the code smell violations using sonar lint in VS2019
please note that we are using sonar Lint in connected mode wit sonar cube server
Connected mode is to designed to configure the IDE to use the same set of rules as are configured in your Quality Profile on the SonarQube server, so if the code smell rules are part of your Quality Profile then they will be enabled in the IDE too.
If you don't want to see those issues reported in the IDE then you could either remove those rules from the Quality Profile, or use standalone mode and configure the set of rules to run locally as described here.
After doing some tweaks in the visual studio I was able to add the column category to the sonar output window and in that filtered out the sonar issues other than code smells.
I have installed sonarqube locally version : sonarqube-6.7.2
I am able to login in sonarbube locally using http://localhost:9000
created project and bind to one of my visual studio project.
But when I update in visual studio using sonarlint but not able to find anything on locally published site.
No report no issue even no code.
Using windows 10.
SonarLint does not publish issues to SonarQube, you need to integrate SonarScanner for MSBuild into your CI build process to do that. You could do it as plain command line, as described in the documentation link above, or using the plugin for Jenkins or the VSTS/TFS extension.
I installed the SonarLint 6.6 for Eclipse (neno) using Eclipse marketplace.
It successful scanned my java project and returned 4725 items found.
I bind the project to SonarQube server which installed at the same PC
After anaylized the project again, I click "update all project bindings" at the SonarQube at Eclipse server to syn the result to SonarQube
My Questions
1) How can I syn the analyzed result to my server?
2) Are there any tool to category the analyzed result such as by severity? as I only interest on the "BUG"?
3) How can I configure the rule of SonarLint in Eclipse Environment?
May I have your help? Many thanks!
1) How can I syn the analyzed result to my server?
To analyze your project and see the result on SonarQube, you need to use one of the scanners. For example, if you build your project with Maven, then you can use the scanner for Maven. Or if you build your project with Ant or Gradle, there is a dedicated scanner for those too (as I linked). If you don't use any build tool, then you can use the scanner for CLI.
2) Are there any tool to category the analyzed result such as by severity? as I only interest on the "BUG"?
I'm not aware of such tool. And, at the time of this writing, the SonarLint On-The-Fly view is not configurable to do this (unlike the "native" Problems view of Eclipse). (This might be a good idea for future improvement, if there's enough interest for it.)
3) How can I configure the rule of SonarLint in Eclipse Environment?
It seems your project is bound to a project on SonarQube.
You can configure this on SonarQube.
In SonarQube, each project is associated with a quality profile.
After you can configure what rules to include,
you can update the bindings in Eclipse to apply the same configuration for SonarLint in Eclipse.
I have installed SonarLint extension (V 2.8) for Visual Studio 2015.
Can the code be analysed locally WITHOUT connecting to a SonarQube server?
Do I need to install something else in order to analyze my code (if i dont have SonarQube)?
I dont see the rulesets added to my project. How do I add rulesets? and from where?
I checked the SonarLint GitHub page but couldn't find the relevant documentation
After you install SonarLint for Visual Studio, analysis results (warnings) will automatically show up in the Error Window. You might need to enable Tools/Options/Text Editor/C#/Advanced/Enable full solution analysis otherwise only open files will be analyzed.
Most of the rules are enabled by default, some of them are not. You can control this through the ruleset file, but when no ruleset file is present, the default rule activation is used. Rule enablement can be changed for each of your projects by right clicking on References/Analyzers/Open Active Rule Set. This part is documented on the SonarLint website here: FAQ. (Note that this is not specific to SonarLint though, it's the normal Visual Studio experience.)
I am so close yet so far from getting my Visual Studio (MVC) application released through TFS & Release Management. I am using Version 2013 and have my build definition setup as follows:
As you can see it is using the TfvcTemplate.12.xaml as its template, and as such I cannot see the options for Release as I have been finding in all other examples online - eg:
I have gone into Release Management and setup my Release Template to reference this build definition and selected 'Can Trigger a Release from a Build'... but I have nothing happen in RM when I Build in Visual Studio.
What I have also found is that because the application I am building is MVC with Windows Authentication - every time I run a manual release, the Web Site gets rebuilt (as per my release template), but the website is always rebuilt with Windows Authentication Disabled... Which is a pain as I keep having to go into IIS after every release to enable Windows Authentication.
So, my questions are...
1) What am I doing wrong with my version of the Build Definition setup that it will not prompt a release?
2) Do I have to Remove and Create my website on the Release Template... and if so...
3) How do I get around the fact I always have to revisit IIS to enable Windows Authentication after each release?
Thanks!
You need to switch your build template to ReleaseTfvcTemplate.12.xaml.
You can find that file in the folder:
Program Files (x86)\ Microsoft Visual Studio 12.0\ReleaseManagement\bin
You need to check that into your TFS repo, then switch your build definition over to use it.https://msdn.microsoft.com/library/ms181355(v=vs.120).aspx#add_template