sonarlint integration with eclipse

We’ll learn how to integrate SonarLint with Eclipse and IntelliJ in this post. This will allow you to assess the quality of your test automation before committing it to your code repository. Eclipse and IntelliJ are the most popular IDEs for Selenium Test Automation. Another easy way to integrate with SonarQube is using Jenkins jobs. Read more on how to set up Jenkins and SonarQube for test automation.

What is SonarLint?

SonarLint for Eclipse | Code Quality & Security Extension

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.

Skip to: How to install SonarLint for IntelliJ

How to install SonarLint for Eclipse?

Sonarlint for Eclipse is simple to install and configure. There are a few options for installing this; pick the one that works best for you.

  1. Install SonarLint via Eclipse Marketplace
  2. Install as New Software to Eclipse
  3. Install by Drag Drop from Eclipse Marketplace

Install SonarLint via Eclipse Marketplace

  • Open Eclipse Marketplace : Help > Eclipse Marketplace
Eclipse Marketplace
  • Click the search tab to search for “SonarLint”
  • Click on the Install button against the search result for SonarLint Plugin
SonarLint in Marketplace
  • Installation should get started post accepting the license agreement
  • Finish by restarting Eclipse. The Eclipse SonarLint marker will then be enabled on issues in the codebase based on the common pre-set rules with SonarLint standalone.

Install SonarLint as New Software to Eclipse

  • Go to Menu Option: Help > Install New Software
Eclipse install new software

  • Enter “‘” in the “Work with” field at Available Software window
  • Select SonarLint install options and click Next, click finish in the next window
image 3

Install SonarLint by Drag-Drop from Eclipse Marketplace

  • Go to SonarLint Eclipse plugin Page –
  • Click on “Install in Eclipse for Free” on the top right, a pop-up with available IDEs will appear
  • Click on Eclipse, which will take you to the eclipse market place page
  • drag install button there to Eclipse workspace
  • check the plugin option and click finish
  • You may want to navigate to this page directly –

Bind Eclipse with SonarQube

SonarLint uses the analyzers, quality profiles, and parameters configured on the SonarQube server when the Eclipse project is linked to the SonarQube server project. follow the below steps to bind Sonarlint with SonarQube Server.

  • Go to File > New > Other
  • Under SonarLint, Select New Server
  • Click next and fill the wizard with the Sonar sever details (URL and credentials or token) and test connection.
  • Click on Add to select the Project and Done.
See also  Best IDEs for Selenium with Java to use in 2022

How to Install SonarLint for IntelliJ

  • Go to Settings > Plugin
  • Search for SonarLint in the search box
  • Click on Install button
  • Restart IntelliJ and you are done
SonarLint IntelliJ

Right Click on the file to analyze. Then Go to SonarLint > Analyze with SonarLint

Analyze with SonarLint


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.