Eclipse is not showing results in the SonarLint report

I am using Eclipse IDE Version: 2019-09 R (4.13.0) Build id: 20190917-1200
For SonarLint I am using version 5.3.0
For SonarQube we are using version 8.3.1

I set up SonarLint to connect to the SonarQube server. When setting up the connection everything works as expected but after running an analysis on my project nothing shows up in the SonarLint report. I can confirm that there are issues that should be populated in the report but are not.
There are no error messages being shown in the Eclipse console.

On the SonarQube server we are seeing connections from SonarLint Eclipse and there are no errors shown there either.

Any help would be much appreciated as I have no ideas on what could be causing this.

Hello Ryan,

Welcome to the community, and thanks for raising this discussion.

What do you mean by “running an analysis” ? Was it in SonarQube or inside Eclipse ?

Maybe some clarifications first: the “SonarLint Report” view is supposed to show the results of analysis that are run from Eclipse. As explained at the bottom of the view: “Run the analysis from the SonarLint context menu to find issues in the SCM change set or in all your project files”. You can for example right click on a file or a project in the Explorer view, then SonarLint, then Analyze.

The Report view is not populated when a SonarQube analysis is triggered, it is only populated when triggered from the IDE.

That said, we may have a problem with your specific setup. Could you try to open the Console view, select “SonarLint console” and make sure the “Verbose output” and “Analysis logs” options are checked ? Maybe you can send us the logs you observe in this console when you trigger an analysis from the context menu. We could then better help you.


1 Like

Hi Damien,
Thanks for the response. To be more clear when I reference “running an analysis” I am referring to the SonarLint context menu within the IDE. I changed my console view as you suggested the console output was pretty large and I was not able to attached the entire thing but I took the error that is showing as well as the first few lines which seem to be excluding .java files?
Thanks again,
SonarLintConsoleOutput.txt (18.3 KB)

Thanks for your input.

It looks like your SonarQube instance is not reachable from the IDE. Is it running behind a proxy ? Are you able to query the URL in your browser ? I don’t understand how you were able to configure the binding successfully, and then get this error later. Is it possible that your network was temporarily down ?

I tried to browse to the URL of your SonarQube instance and it seems that it is not configured with a valid HTTPS certificate. Maybe this could also prevent the connection from Eclipse. Could you try with a valid one, or maybe with HTTP only to see if it solves the problem ?

One other thing you could do is try to remove and re-create the binding and check the logs to see if you can observe the same error.

About the excluded files, this is not normal. Is your project correctly configured ? I can see you have different source folders, are they properly declared as such ?

Thanks for your feedback

I tried recreating the binding using HTTP as you suggested and the connection errors have gone away. I think now the only issue is the project configuration. When importing the project as a Maven project I got a few issues in Eclipse that I’m not seeing in other IDEs (IntelliJ, VSCode). I am attaching a screenshot in case you have seen something like this before. I think if I can get Eclipse to configure the project in the right way it will stop excluding the .java files.

Either way I think SonarLint is now configured correctly and the issue is on my project’s end so I’ll see if I can figure that out.
Thanks so much for the help!

Hello Ryan, thanks for your feedback.

To me the errors “The set of natures is not valid” are the first you should try to solve.

How did you import the project into Eclipse ? Do you use an Eclipse version with Java support ? Maybe the .project files present in your workspace do not contain the correct Java nature.

You could try removing .project files from all the folders and reimport all projects, with File > Import > Maven > Existing Maven projects. Make sure you select all your projects. The Java nature should be present in each .project file.

Hi Damien,
We managed to work through the configuration issues we were seeing when importing the project. We are able to get results back from the server now and see the scan report within the IDE. Thanks for all of your help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.