Introduction
Open source code quality management platform for quality management through plug-in source code form, can be supported include code quality java, C #, C / C ++, PL / SQL, Cobol, JavaScrip, Groovy two dozen programming languages, etc. management and testing. Integrated CheckStyle, PMD, Findbugs validation rules and other tools, having a repeating codes found, the code test coverage rate code comments, and all the detection rate of change of tracking features.
Feature
SonarQube: open source code quality management and control platform, we use http: // localhost: 9000 is the SonarQube.
SonarLint: an extension plug-in that can be installed with the idea eclipse and other development tools
Use in Eclipse
1, the installation
help -> eclipse marketplace ..., search sonarlint, Install.
2, using
Java file open, it soanrlint automatically detect, or non-standard for the code in question blue wavy lines will be designated below as:
Mouse over the blue part of the bomb box will display an error message or proposed to amend the information
Click on "open description of rule" can see the specific description of the error, the error examples and modified examples.
On a project or a single java file Right -> sonarlint -> Analyze manual operation analysis. In this way the SonarLint Report panel to view all exception information
3、Server
The main purpose of the connection is synchronous SonarQube analysis rules, rules and mass customization. As follows:
Find SonarLint Bindings open> show view - from Window;
Create a server connected to the space in the right panel, select SonarQube
Use UserName + Password or token landing
No token can click on the right button to create, or find an administrator to create
Configuration Name
Complete service configuration
Binding works, click on add
Enter the name of the project created sonarQube
carry out
4, the results show synchronization SonarQube
In the maven settings.xml configuration as follows:
After configuration, use soanr: sonar command to run the project, this section requires JDK 1.8.clean install sonar:sonar
You can open http: // localhost:? 9000 / dashboard id = com.xxx view corresponding error message, you can click Issues to view the SonarQube
IDEA is used
1, the installation
File -> settings -> plugins 搜索sonarLint,Install。
2, using
Click to hide in the lower left panel, you can see sonarLint, open
Open the java file, soanrlint will automatically detect the code for non-standard or questionable adds a dark golden background color, the mouse will be put up as shown in Tip:
Analysis can also be performed manually by an inverted triangle click on the green map.
3、 Server
The main purpose of the connection is synchronous SonarQube analysis rules, rules and mass customization. As follows:
Find "SonarLint General Settings"> OtherSettings Open from the File - -> settings;
Click the plus sign, enter a name, such as localhost; select SonarQube, Url is http: // localhost9000;
Select Login / Password or token, or enter the username and password token;
finish
Check the "Enable binding to remote SonarQube Server", select the server to add, and search for the items you need to bind, and then select OK.
4, the results show synchronization SonarQube
With Eclipse section, which requires JDK 1.8.