0

I am trying to learn how to use SonarLint plugin in Eclipse. I downloaded the plugin and I have 4 views in my Eclipse now - SonarLint on the Fly, SonarLint Report, SonarLint Rule Description, SonarQube Servers.

In the SonarLint on the Fly, I am able to see only the JavaScript bugs scanned by SonarQube. Not the Java ones (I have Java rule set in SonarQube server as well). But if I open a Java file, then I am able to view java bugs and errors in this window.

In SonarReport, I have two tabs at the bottom - Current Project and All Projects. When I click on Current Project it scanned the current project and showed me only JavaScript errors but not Java.

So, my question is - Is there any way to see Java errors along with JavaScript? I should be able to view the Java errors throughout my project (without having to open java files and then see the bugs).

1 Answer 1

1

If analysis of JavaScript files is working, it should be easy to also have Java files. Few things to check:

  • For Java analysis to work fine, you should have installed the optional feature "SonarLint For Eclipse Java Configuration Helper"
  • Java files that are not part of an Eclipse Java project are ignored

Also, in the SonarLint Report view, the two buttons will only analyze changed files (ie files that are reported as changed by your SCM) so be sure that you also have some Java files with modifications.

Looking at SonarLint console while enabling verbose + analysis logs may help to understand your issue.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi Julien, yes I have installed the "SonarLint For Eclipse Java Configuration Helper" as well in my eclipse. But still facing the same issue.
Also, I tried to add the contents of SonarLint console here but I cannot since it's huge! Is there anyway I can attach a file here?
You can post on a separate site like pastebin. Or open a thread on SonarLint Google group with a reference to this question. BTW since your are more asking for support than asking a real question, it is probably more appropriate to continue on the Google group.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.