eclipsesonarqubesonarlint-eclipse

Sonar Lint Eclipse Issue


I'm using Eclipse Neon and SonarQube 5.6.6(LTS). I've install sonarLint version 3.1.0. Following are my question.

  1. In SonarLint whether there is an option to analyze the entire project? I can't able to find such option.
  2. 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?
  3. 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?
  4. 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?

Solution

  • 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:

    SonarQube binding

    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.