Sitemap
Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Sonar Lint with Different IDEs

4 min readAug 19, 2022

--

Get the power to write better code

Press enter or click to view image in full size

What is Sonar Lint?

Sonar Lint is an open-source that performs static analysis on code.
With this tool, we can get instant feedback on code quality issues during development. This allows us to address potential bugs and vulnerabilities before they are committed into the codebase.

Languages including C, C++, HTML, Java, JavaScript, PHP, Python, and TypeScript are supported by Sonar Lint.

Let’s see how to add sonar lint to the IntelliJ IDE.

  1. Open the IDE and select File -> Settings
Press enter or click to view image in full size

2.After selecting the settings, the below window will appear. And select Plugins and type Sonar in the search bar and click Install.

Press enter or click to view image in full size

3. Then click Restart IDE.

Press enter or click to view image in full size

4. After that, as shown below, you will be able to see the Sonarint in the task bar.

Press enter or click to view image in full size

Let’s see how to add sonar lint to the NetBeans IDE.

  1. Open the IDE and select the tools in the top menu.
Press enter or click to view image in full size

2.Then choose plugins in the drop-down list.

Press enter or click to view image in full size

3.Then this plugin pop-up window will appear and you can select Available Plugins and type sonar in the search bar. You will be able to see the sonarlint4netbeans if you are using version 13.0 or higher NetBeans version and Java version 11 or higher.

Press enter or click to view image in full size

4.If it appears, select the check box, click Install, and click Next.

Note: If you encounter any proxy issues while installing. Click on Tools -> Options in the General tab, select the No Proxy radio button.

Press enter or click to view image in full size
Press enter or click to view image in full size

After continuously clicking Next, the below window will appear. Select the Restart option as needed, then click Finish.

Press enter or click to view image in full size

After all, you can analyze your project by selecting it and by right clicking and selecting the option “Analyze with SonarLint”.

Press enter or click to view image in full size

Let’s see how to add sonar lint to the Visual Studio Code.

  1. Open the IDE and select View -> Extensions
Press enter or click to view image in full size

2.After selecting the Extensions, the below window will appear. And type Sonar in the search bar and click Install.

Press enter or click to view image in full size

Let’s see how to add sonar lint to the Eclipse.

  1. Open the IDE and select Help -> Eclipse Marketplace
Press enter or click to view image in full size

2. After selecting the Eclipse Marketplace…, the below window will appear. type Sonar in the search bar and click Install.

Press enter or click to view image in full size

3. Restart the IDE.

Thank you for reading ! I hope the article is helpful.

References

[1] https://www.sonarlint.org/

[2] https://devblogs.microsoft.com/premier-developer/real-time-code-quality-with-sonarlint-in-visual-studio/

--

--

Thukaraka
Thukaraka

Written by Thukaraka

Software Engineer@ SyscoLabs Sri Lanka| Undergraduate | Computer Science and Engineering | University Of Moratuwa

No responses yet