Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPE when analysing project in Eclipse (SonarQube 5.2)

I updated from SonarQube 5.1.2 to 5.2.

In Eclipse I start analysis with SonarQube with the latest plugin version. But a dialog pops up saying there is a NPE. The Eclipse error log displays:

java.lang.NullPointerException
    at org.sonar.ide.eclipse.wsclient.internal.SonarWSClientFacade.getUnresolvedRemoteIssuesRecursively(SonarWSClientFacade.java:170)
    at org.sonar.ide.eclipse.core.internal.remote.RemoteSourceCode.getRemoteIssuesRecursively(RemoteSourceCode.java:107)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.doRefreshIssues(SynchronizeAllIssuesJob.java:131)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.fetchRemoteIssues(SynchronizeAllIssuesJob.java:120)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.run(SynchronizeAllIssuesJob.java:76)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

What is the problem? How can I make analysis in Eclipse work with SonarQube 5.2?

like image 796
Andreas Gryphius Avatar asked Nov 25 '15 13:11

Andreas Gryphius


People also ask

How does SonarQube integration with Eclipse?

Figure 11.3. The SonarQube plugin for Eclipse helps you close the circle of code quality. It gives you local visibility into existing issues in the files you're working on, helps you manage your issue assignments, and lets you prescan your code changes for issues.

How do you test sonar lint in Eclipse?

You can also analyze all the project with right click over it -> SonarLint -> Analyze all files. Issues are marked in the editor and also appear in the "SonarLint Issues" view (Window -> Show View -> SonarLint Issues).

What is Sonar lint Eclipse?

SonarLint is an IDE extension that helps you detect and fix quality issues as you write code. Like a spell checker, SonarLint squiggles flaws so that they can be fixed before committing code.

How can I download SonarQube in Eclipse?

Go to Help > Eclipse Marketplace... and search for "SonarQube". If you are not finding SonarQube. Follow next steps Go to Help > Install New Software... This should display the Install dialog box.


1 Answers

You cannot use Eclipse SonarQube Plugin with SonarQube 5.2 or newer.


From SonarQube Wiki:

The SonarQube Eclipse plugin is deprecated

The SonarQube Eclipse plugin does not work with SonarQube 5.2+. It is replaced by SonarLint for Eclipse.

Note that SonarLint for Eclipse 1.x series do not cover yet all the features of SonarQube Eclipse plugin, but versions 2.x will definitely cover this gap.

like image 167
agabrys Avatar answered Nov 02 '22 23:11

agabrys