Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Using Sonarqube for code review in idea intellij

Shulou Source: shulou.com Published: 2022-06-03 07:38:11 09月12日 Update

Sonarqube is a very powerful tool for code quality inspection and management. Be able to recognize multiple common programming languages and be able to set up different Rule

Sonar is an open source tool for code quality management, which can identify common code quality problems in a variety of programming languages (such as Java, PHP, Pythod, etc.) in the form of plug-ins. Sonar can help you analyze the following code quality problems:

1. Do not follow code standards

two。 Potential defects

3. Code repetition

4. The annotation rate is insufficient or too high

5. Poor complexity distribution

6. Lack of unit testing

In a company, the Sonarqube is usually placed on the server side, and when the developer submits the code, the Jenkins triggers the Sonarqube for code review. But it's inefficient for developers.

The sonarqube plug-in can be installed in idea intellij, and the Sonarqube server can be installed locally or on a LAN server. This makes it possible to use sonarqube locally for code review through plug-in connections.

Sonarqube download:

Https://www.sonarqube.org/downloads/

For specific installation, you can refer to his online help, the only thing worth noting is that his default database is H2, but this cannot be upgraded. It needs to be replaced with another database. Modify database connection in sonar.properties

Open the local address after modification:

Http://localhost:9000 can open the website and the installation is successful.

Log in with admin,admin to create a new Project, set up Rules, and use more.

Search for SonarLint installation plug-ins in Idea intellij

Set the Sonarqube server address in Settings-- > SonarLint General Settings:

Bind SonarQube project in SonarLint Project Settings:

This allows you to use SonarQube in your development environment.

Tags: Code plug-ins servers quality services checks data databases developers people functions addresses multiple tools programming languages languages problems management programming differences Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info Docker Shulou Technology MySQL