Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use SonarLint in Eclipse

I was assigned to use SonarQube for code quality. But while I'm downloading it's plugin to Eclipse I understood it is deprecated and new one is SonarLint.

But as so far I couldn't find any good documentation to how to use SonarLint. How to check java project using that. I only got touch with Youtube videos. But sadly they are really really unclear to me.

If can direct me to a good place to gain clear knowledge on this I'll be really grateful to you.

like image 995
Dil. Avatar asked Jan 22 '16 06:01

Dil.


People also ask

What is Eclipse SonarLint?

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.


3 Answers

You can install SonarLint from the Eclipse Marketplace and read the official SonarLint documentation

like image 80
Sumit Singh Avatar answered Oct 23 '22 22:10

Sumit Singh


If you want to analyze a complete project with the Sonar Lint plugin, you can trick the plugin by searching all Java files with a text editor and replacing "package" with " package". This will cause SVN or git changes. Open the "Sonar Lint Report" view and run the analysis on the "Current project". Afterwards, revert all your SVN changes. Do not run the analysis again as the Sonar Lint Plugin only analyzes changed files.

I found this helpful when I had no project on the Sonar server available.

like image 30
Matthias T Avatar answered Oct 23 '22 20:10

Matthias T


You can install SonarLint as described by Sumit Singh. Then you can link your project to a sonarqube server as described here

After that just make a change and save it. Sonarlint will automatically analyze the project for you. Cause analyzing is enabled by default (as far as i know)

like image 28
Naxos84 Avatar answered Oct 23 '22 21:10

Naxos84