Configuration and use of sonarqube code Quality Management Platform

Source: Internet
Author: User
  • Sonarqube configuration (prerequisite: Log On with the admin user)

1. Install the Chinese localization package:

Setting> Update center> availableplugins> localization> Chinese pack

> Install

650) This. width = 650; "src =" http://s5.51cto.com/wyfs02/M01/81/FC/wKiom1dGsBDDOKxuAABqKledwEw545.png "Title =" code quality a1.png "alt =" wkiom1dgsbddokxuaabqkledwew545.png "/>

After the Chinese package is installed, you must restart sonarqube to make the package take effect (you can install the checkstyle, PMD, and other plug-ins before restarting)

650) This. width = 650; "src =" http://s2.51cto.com/wyfs02/M02/81/FC/wKiom1dGsB2Bwju1AAAs_AA4-ro198.png "Title =" code quality a2.png "alt =" wKiom1dGsB2Bwju1AAAs_AA4-ro198.png "/>

#/Root/sonarqube/bin/linux-x86-64/sonar. shrestart

Stopping sonarqube...

Stopped sonarqube.

Starting sonarqube...

Started sonarqube.

 

Refresh sonarqube: http: // 192.168.4.221: 9090/sonarqube/

650) This. width = 650; "src =" http://s4.51cto.com/wyfs02/M01/81/FB/wKioL1dGsTWRaVGfAAC8_eOaRYc022.png "Title =" code quality a3.png "alt =" wkiol1dgstwravgfaac8_eoaryc022.png "/>

The Chinese version is successful (note that the Chinese version is not completely Chinese) And you can log on again.

 

2. install, configure, and use the sonarqube Plugin in myeclipse/Eclipse:

Http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse

Http://docs.sonarqube.org/display/SONAR/Installing+SonarQube+in+Eclipse

Http://docs.sonarqube.org/display/SONAR/Configuring+SonarQube+in+Eclipse

Http://docs.sonarqube.org/display/SONAR/Working+with+SonarQube+in+Eclipse

(Please refer to the official documentation and do not explain it here. We will focus on the use of sonarqube in combination with Maven plug-ins)

 

3. Configure and use the maven analyzer plug-in

Http://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+Maven

In the settings. XML (settings_edu.xml) configuration file of the maven local library

<Profiles> </profiles> Add the following configuration to the node:

<Profile>

<ID> sonar </ID>

<Activation>

<Activebydefault> true </activebydefault>

</Activation>

<Properties>

<! -- Example formysql -->

<Sonar. JDBC. url>

JDBC: mysql: // 192.168.4.221: 3306/sonarqube? Useunicode = true & amp; characterencoding = utf8

</Sonar. JDBC. url>

<Sonar. JDBC. Username> root </sonar. JDBC. Username>

<Sonar. JDBC. Password> wusc.321 </sonar. JDBC. Password>

<! -- Optionalurl to server. default value is http: // localhost: 9000 -->

<Sonar. Host. url> http: // 192.168.4.221: 9090/sonarqube </sonar. Host. url>

</Properties>

</Profile>

 

Use the maven analyzer for analysis. command:

Maven command: MVN clean install Sonar: sonar

Run: clean install Sonar: sonar in myeclipse.

(If this is the first time you run this command, you will find that it will first download plug-ins such as sonar-runner)

After the analysis command is successfully executed, you can view the code quality analysis result data in the web server.

 

4. Configuration:

(1) Configuration

(2) Permissions

(3) System

5. Quality configuration introduction (switching the default configuration)

6. Introduction to Code rules (Custom Rules)

7. problem handling (reflection of Quality Management)

8. Table

9. dashboard (custom)


This article is from the "11642765" blog, please be sure to keep this source http://11652765.blog.51cto.com/11642765/1783512

Configuration and use of sonarqube code Quality Management Platform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.