ensure code quality. From a practical point of view, the automated code Review is more static analysis of the codes, by scanning the code and contrasting the rules that are produced to produce the desired results. The desired result can be a quantitative quality report for the project as a whole, or a warning to be displayed in Xcode??。 This depends on what role the user is in.In practice, there are generally two roles that will focus on the results-engineers and management. Engineers need to b
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 Jenkins to pull code without compiling and scan only. 1, first download the latest
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
Precautions1, only a set of environment, we all unified use this set can, do not repeat the maintenance of other environments, directly in the link to create a job, convenient unified management.2, after the boot all files are stored in the/home/user name/.jenkins directory, you can save the configuration by backing up the/.jenkins/job/project name/config.xml file.3, please do not arbitrarily modify other people's job, create their own just fine.Chapter II
mysql| Data | Database CNET science and Information Network February 5 International Report according to software evaluation company Coverity Friday (January 4), through the open source database used by many websites--mysql's source code analysis, found that its vulnerabilities than other commercial database code loopholes.
According to Coverity's report, Coverity used its own research and development softw
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
.
The Sonarqub e platform is comprised of 4 parts: SonarQube Server SonarQube Database SonarQube Plugins SonarQube Scanner SonarQube with Sonar Installation and configuration of Qube-scanner SonarQube
In the S Onarqub E official w
+ +, and C #,Java is also supported.
Pay
Ounce Labs
\
http://www.ouncelabs.com/
Coverity Prevent
C/c++,c#,java
Pay
Coverity
There are other accessibility tools:1.Coverity Thread Analyzer for Java2.Coverity Software Readiness Manager for Java3.
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
(Default None)
–stop-grace-period value
Time to wait before force killing a container
(Default None)
–update-delay duration
Delay between updates
–update-failure-action string
Action on update failure (pause
Continue
–update-parallelism UINT
Maximum number of tasks updated simultaneously (0 to update all at once)
(default 1)
-U
–user string
Username or UID
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
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
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
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.