Sonar Lint Eclipse Issue - eclipse

I'm using Eclipse Neon and SonarQube 5.6.6(LTS). I've install sonarLint version 3.1.0. Following are my question.
In SonarLint whether there is an option to analyze the entire project? I can't able to find such option.
The issue showing in Eclipse reported by sonar lint is different from reported on server. When I'm wantedly creating the sonar issues(based on the rule) in eclipse but SonarLint is not recognizing . why?
From Eclipse I've made the connection to the SonarQube server and the connection was success, Whether it is using the activated quality profile rule?
After resolving the issues, how the issues will be reflected to the sonarQube server ? In case of Maven whether I need to add the sonar properties and sonar-maven plugin and trigger the build?

1. Select your project and in Eclipse's Quick Access, select Analyze - Analyze with SonarLint. You can also assign a keyboard shortcut to this action by going to Window -> Preferences -> General -> Keys.
2. It seems as if you are not running in connected mode. Connecting a SonarQube server is not enough, you also have to bind individual projects. To do this, right click on your project in Eclipse, and select SonarLint -> Bind to a SonarQube project... Search for the name of your project on the server by typing in the box under SonarQube project, as show in the following screenshot:
Once connected, a SonarQube symbol should appear on your project's icon in Eclipse.
3. Once connected, the quality profile of your SonarQube server project will be used.
4. SonarLint only provides on the fly feedback, but does not trigger any analysis server side. Personally I have a clean verify sonar:sonar Maven run configuration for my projects, and run it every now and again within Eclipse.
I recommend reading the SonarLint documentation for more information.

I personally recommend either to change your version or to be sure which configuration really applies to your machine. I had similar problem when i tried to associate my local project with the project name on Sonarqube Server . I was using Eclipse IDE for C/C++ Developers Version: Luna Service Release 2 (4.4.2) with Sonarlint version 4.0 . I uninstalled it(sonarlint) and installed the Sonarlint 3.6 version. After this i could associate my project with Sonarqube Server.
Hope it Helps the main question.

Related

Can't choose an existing server in a Dynamic Web Project a in Eclipse

My colleague just set up a Dynamic Web Project in Eclipse and he also configured the server. He shared the entire project on a git repository and I cloned it. When I try to run the html file I click on 'run on server' but then I'm not able to choose an existing server already configured. Eclipse force me to create a new server with default configuration. I am attaching a screenshot of Eclipse
https://www.youtube.com/watch?v=ipqTnzTPgj0
Help --> Install new software ---> install " eclipse repository - https://download.eclipse.org/releases/oxygen ".
Then install the package for -- Web,XML, Java EE and OSGi Enterprise Development.
Reboot your computer and eclipse. Then it will work. Good luck.
It works for me:
Properties -> Project Facets and do it like this
Right click on you project and go to properties. Go to Project Facets and on Dynamic Web Module click the little drop down menu and select 3.1. I initially had it at 4.0 and it was not supported in my version of Eclipse.

SonarQube Plugin and TI Code Composer 5

I am currently working on a TI Microcontroller platform using Code Composer 5.5 as the IDE. Our code baseline is analyzed by SonarQube to produce metrics and issue identification against a set of rules and standards.
SonarQube website mention support for Eclipse via a plugin. Since Code Composer 5 is Eclipse based I was able to install it but I cannot finish the configuration by linking the project as described. When I right click on the project in the Project Explorer there is no option to Configure then Associate with SonarQube.
Is there a way to make this menu option show or a command line method to make this association?
If I recall correctly, only projects with the following 'nature' can be associated with SonarQube:
Java (JDT) Project
C/C++ (CDT) Project
Pydev Project
If your TI Code Composer projects do not have one of these natures, you won't be able to associate them (at least with the current version of the Eclipse SonarQube Plugin).
Got help from our friends at TI E2E forums on this topic.
The reason I was unable to see the Configure and Associate menu options was due to the selected perspective. Code Composer 5 uses TI's default CCS Edit perspective which hides the expected menu options. If you change to the default Eclipse C/C++ perspective then the menu option shows up and configuration of the project to use SonarQube can be completed.

Eclipse does not show associate with SonarQube option while associating the project at first time

I have installed Sonar plug-in for eclipse Kepler.
Installed Sonar server and running it locally from localhost (localhost:9000)
Tested the Server connection in Eclipse from
Windows>Preferences>Sonar>Servers. Connection is successful.
For my Project, ran the Maven goal for sonar (sonar:sonar). Build is successful. I am able to browse the results in localhost. (localhost:9000)
My issue is with Associating the project to Sonar. When i right click on my project > Configure ,but it does not show associate with sonarqube option.
Help me associate my project to Sonar in eclipse. Please let me know what i am missing.
I was facing the same issue for one of my Java project and I figured out that no facets were selected.
When I selected java in facets, I got "associate with SonarQube" option.
Open project properties by rightClick on projects->Properties
Select Project Facets and check whether any option is selected or not. If not selected, select facet according to your project then you should be able to see "associate with SonarQube".
I did the below:
Project >> Properties >> SonarLint
and then click Bind this Eclipse project to a SonarQubeProject
Make sure the mapping is complete -> Eclipse Project to SonarQube project
Use Autobind selected projects button option
Finish

SONAR Integrated with Eclipse

Am working on sonar integrated with eclipse using ant
But when i go "right click project-->configure-->associate with sonar" nothing happens!!
My ant version is 1.7.1
Eclipse is Helios(3.6)
sonar version is 3.4.1
Welcome all your favours..........
Sonar Eclipse has nothing to do with Ant, it's really independendent.
You should follow the different steps listed in the documentation page. Most notably, you need to have a Sonar server up and running somewhere (on your local computer or elsewhere) and you must make sure that you already launched an analysis of your project, which you can browse on Sonar Web application. If not, you'll never be able to associate your project in Eclipse.
Once you have a first analysis of your project on the Sonar server, then you need to configure the URL of your server in the Eclipse settings. Only after this, you'll be able to associate your project with Sonar.
This might have to do with your plugin version. As described in the docs Version 3.0 is only compatible with Eclipse 3.7 and up.
I would suggest you either upgrade your eclipse or you downgrade your plugin.

Using SonarQube in Eclipse

I just installed SonarQube in Eclipse, but I don't know how to use it :
Here It said:
Link projects to Sonar server
What is the server? Should we create another project somewhere else with the same name as the project in Eclipse?
It's really confusing, I will appreciate if someone could help by a small example.
To be able to use Sonar Eclipse, you first need to install a Sonar server 5.1 or older as described here: http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse
Then, you will have to run a first analysis (out of Eclipse) of your project to have it referenced in the Sonar server. See http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code
After those 2 steps, then you'll be able to run analyses directly within Eclipse once you have associated your local project with the Sonar server.
UPDATE:
Sonar 5.2+ is no longer supporting sonar eclipse plugin in favor of sonarlint. Unfortunately sonarlint has no customization options.
We will make this feature available in upcoming versions, probably by
requiring to "connect" SonarLint with an existing SonarQube server
instance.
Sonar can be run now localy to analyse the java project
for more information visit sonar eclipse
Eclipse update site
Installation guide
Eclipse marketplace
Also you can visit DZONE for step by step installation procedure