Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using Sonarqube for code review in idea intellij

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report