form, conduct mutual check at the same level, solve the problems found, and analyze the results. In agile practices, the related requirements for code are either paired programming or code review.
Recommended alternative code review with sonar see http://t.cn/zHFfH8a
Code review efficient combination recommendation
Sonarqube was recently updated on his computer to share the specific practices. This article first introduces the simplest practice: Use
In sonarqube4.4 + Jenkins, one of the code check instances, this article describes how to check without compiling.
However, some code checks require bytecode. For example, if the findbugs check depends on bytecode, The findbugs check cannot be performed only when the source code is extracted in instance 1.
Compile the findbugs check. The following instance operations demonstrate how to set up
First of all, of course, is to download the latest findbugs http://docs.codehaus.org/display/SONAR/Find
First, after the installation of the Sonarqube server, on the other Computer browser landing, began to install other programming language detection plug-in650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" http:// S3.51cto.com/wyfs02/m01/89/13/wkiom1gg7alqv7knaacq0rhva1k861.png "width=
First, install the Sonarqube service end, in other Computer browser landing, start to install other programming language detection plug-ins
The system has installed language plug-ins:
Download the languages that are commonly used in software projects:Android,CSS,Web,XML
Java-Related:Checkstyle,Findbugs,PMD
Java Static Analysis tool profiling objects
Application Technology
Checkstyle
Java source files, defect p
people's job, create their own just fine.Chapter II SonarQube ConfigurationSonar is an open source platform for code Quality management that manages the quality of the source code, can detect code quality from seven dimensions, and can support including Java, C #, C + +, PL/sql, Cobol, Javascrip, Groovy, via plug-in form, Python and so on more than 20 programming languages of code quality management and testing.2.1 installing
packages and classes in code: Analyze whether the relationships between classes are reasonable and complex.
The Sonarqub e platform is comprised of 4 parts: SonarQube Server SonarQube Database SonarQube Plugins SonarQube Scanner SonarQube with Sonar Installation and configu
First, the Environment configuration: 1, JDK Installation and configuration 2, MySQL database installation----directly call the server yard MySQL database, on this basis to create a new database sonar. The database configuration is as follows: 3, the sonar official website downloads the sonarqube version, chooses 5.6.3 version, the official website says is the long-term support, therefore chooses this version. Note that the
Use OCLint and Sonar for iOS code analysis and quality management, oclintios
OCLint is a powerful static code analysis tool that can be used to improve code quality and find potential bugs, mainly for Static Analysis of c, c ++ and Objective-c.
Sonar is an open platform for code quality management. With the plug-in mechanism, Sonar can integrate different test tools, code analysis tools, and continuous integration tools.Install SonarQube
1
Reference:1, 11900000086591082, Https://docs.sonarqube.org/display/DEV/Adding+Coding+Rules3, Https://docs.sonarqube.org/display/DEV/Adding+Coding+Rules+using+Java4, https://docs.sonarqube.org/display/PLUG/Writing+Custom+Java+Rules+101There are two ways to extend code rules: But Java only supports mode 11. Writing coding rules using Java via a SonarQube plugin2. Adding XPath rules directly through the SonarQube
Gradle Cleaneclipse
Problem Description
A Gradle cleaneclipse task was inadvertently executed today, resulting in my project becoming a normal Java project:
Gradle dependence is gone, then right-clicking Build.gradle->run as also has no Gradle option:
Workaround
Project Right-click->config->convert to Gradle Project
merging multiple dependent libraries Problem Description
The Gradle project itself comes with a gradle dependencies dependent library, and sometimes the jar packages we add oursel
Gradle Cleaneclipse
Problem Description
I accidentally performed a gradle cleaneclipse task today, resulting in my project becoming an ordinary Java project:
Gradle dependence is gone, then right click Build.gradle->run as there is no gradle option:
Solving Method
Item Right-click->config->convert to Gradle Project
merging multiple dependent libraries Problem Description
The Gradle project itself has a gradle dependencies dependent library, and sometimes the jar packages we add ourselves may
COMMAND
[root@host31 ~]#
Create service
Create a Sonarqube service, create 4 replicas, and expose port 9000 for external access
[Root@host31 ~]# Docker Service Create--name sonar_service--replicas 4-p 9000:9000/tcp sonarqube
Jr9cu3of
[Root@host31 ~]#
Confirm Results
Confirm that the Sonar_service that generated the 4 replicas have started properly
[Root@host31 ~]# docker service ls
ID NAME
preparatory workThe Gradle version in the project is
3.3, Sonar uses
5.6.6Project for Springboot Project
introducing sonar warehouse addresses and dependency packagesMaven {URL "https://plugins.gradle.org/m2/"} classpath ("Org.sonarsource.scanner.gradle:sonarqube-gradle-plugin : 2.3 ") because it is multi-module, it is placed on the outermost build.gradle
Build.gradle
Buildscript {
repositories {
maven {URL "https://plugins.gradle.org/m2/"}
}
dependencies {
Classpath
Technical debt in Sonar
The computing of technical debt in sonar is based on SQALE (Software Quality Assessment based on Lifecycle Expectations, based on the Software Quality Assessment expected by the Life Cycle) methodology.
SQALE methodology was developed by in‑it and later open-source. If you have read the relevant documentation on sqale.org, you will understand that it is about "Organizing non-functional line requirements related to code quality. In the SQALE method implemented by
The calculation of technical debt in sonar is based on the methodology of Sqale (Software Quality assessment based on lifecycle expectations, software quality assessment based on life cycle expectations).
Sqale methodology was developed by Inspearit, which was later open source. If you read the relevant documentation on the sqale.org, you will see that it is about "organization-related non-functional line requirements for code quality." In the Sqale method of
Dubbo Video Tutorial official website:http://www.roncoo.com/Wu Shuicheng, e-mail: [email protected], qq:840765167"Dubbo-based Distributed System Architecture video Tutorial" contains basic, advanced, high-availability architecture, tutorials with a third-party payment project of the system architecture combat experience as the background, and eventually form a set of distributed system architecture solutions. The technical points covered in the tutorials include Dubbo distributed services, zooke
SonarQube5.5 is released, and the code quality analysis system SonarQube 5.5 is released. Sonar (SonarQube) is an open source platform for managing the quality of source code. Sonar is not only a quality data reporting tool, but also a code quality management platform. Supported languages include Java, PHP, C #, C, Cobol, PL/SQL, and Flex.
The improvement record is as follows:
The new
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.