First, basic knowledge
PMD is a tool for parsing Java code errors. Unlike other analysis tools, PMD learns code errors through static analysis. That is, you report an error without running the Java program. PMD comes with a number of rules that can be used directly, using these rules to identify many problems with Java
Objective:PMD is a static code analysis tool that can automatically detect various potential defects as well as unsafe or non-optimized code.PMD is more focused on pre-detection flaws, and it provides a highly configurable rich set of rules that users can easily configure to treat specific projects using those rules.Installation and use:1. How to install the PMD plug-in in eclipseEclipse menu > Help > Insta
PMD 5.7.0 was released. PMD is a Java program code checker that is released using the BSD protocol. The tool can check whether the Java code contains unused variables, contains empty fetch blocks, contains unnecessary objects, and so on. The software is powerful and highly efficient, and is a good helper for Java programmer Debug. Notable changes are: the "fieldd
PMD is an excellent tool for code checking of Java programs. It can check whether the Java code contains unused variables, whether they contain empty fetch blocks, whether they contain unnecessary objects, and so on.But in the course of use, you will find that there are a lot of error and warning in the PMD plugin, although P
makes up for other tools that use a LINQ (CQLINQ)-based Code query language to query the code like a database query. The previous version of JARCHITECT3 can only query the analysis data extracted from the Jarchitect, but from the JARCHITECT4, it is possible to include the output of many other static analysis tools, and then use CQLINQ to do the query. This is the project manager used to count the amount of work, haha. Reference: How to better utilize PMD
Label:FindBugs, Checkstyle, PMD installation and use of the eclipse plugin First, what is FindBugs, Checkstyle, PMD Findbugs, Checkstyle, and PMD can be plugged into eclipse as plug-ins, but there are also separate tools to implement their functions, such as the Findbugs tool that can be used without having to plug int
ArticleDirectory
E: \ SRC \ confirmratelimitactivity
I didn't know about PMD before. I recently heard about PC lint before I started to get in touch with it. If such a good tool is used, it can help me a lot better.CodeHabits and norms are of great help ~
Let's see how he works.
Many companies use PC lint as a static code review tool for C/C +
To improve the quality of your code, in addition to improving logical control and understanding of business processes, there is room for improvement in the code itself, such as some potential problems that can be avoided early. Similar to the content of the coding code, if all rely on the coder to do their own checks, it will undoubtedly require a lot of work, if you can use the static inspection tools to check the code, then greatly improve the efficiency of coding.
This article is the first of
: Net.sf.eclipsecs-updatesite_5.7.0.201402131929-bin.zip file
Unzip and open the files under Plugins and features to myeclipse corresponding files
Reboot MyEclipse, project right click to see Checkstyle option installed successfully
PmdPMD: Static code analysis tool, automatic detection of potential defects and unsafe or suboptimalThe code.
Download
about PMD
PMD is scanning Java source code and looking for potential problems: a null-and-void capture block (catch blocks) never used parameter NULL if declaration duplicate import declaration never used private method isolation Class short or long type variable and method name
PMD has plug-ins with the following software: JEdit, JBuilder, Netbeans/sun one Studi
When people talk about the code rule engine. Everyone likes to stand on their own and say that they prefer tools, rather than other tools.
For instance, a PMD supporter cocould say:
"Checkstyle is a stupid tool consuming time to search for tab characters when PMD is a smart one that can do the job alone as a good soldier, findbugs is very good for resource consum
PMD is a Java program code checker that is released using the BSD protocol. The tool can check whether the Java code contains unused variables, contains empty fetch blocks, contains unnecessary objects, and so on. The software is powerful and highly efficient, and is a good helper for Java programmer Debug. the supported editors for PMD include:JDeveloper, Eclips
One, PMD is scanning Java source code and find the following potential problems:local variables that have never been usedempty snap block (catch block)parameters that have never been usedempty if DeclarationDuplicate Import Declarationsprivate methods that have never been usedOrphaned classesshort or Long variable and method nameTo join the PMD check, the following code if joined in the reporting node is ex
Today again want to start Java Code Static Detection Tool utilization problem, mainly try to use PMD again, found a lot of code coding problems and good code recommendations, and learned a lot of their own prior to the Java convenient basic knowledge, feel very good, the relevant understanding of the good rules of the recollection summary, In the future coding process to be ready to use the Code static Chec
leadership support, the project members are good response is difficult to say, if we all like to improve more inspection is not too late.
In fact, a dependent detection, but now the project is using the SSH architecture, the existing dependency checking tool, the support for spring is not very good, and then give up.
For the choice of tools, tight is familiar with the choice of Checkstyle, FindBugs and PMD
DesignInstallation method:Download: Net.sf.eclipsecs-updatesite_5.7.0.201402131929-bin.zip fileUnzip and open the files under Plugins and features to myeclipse corresponding fileRestart MyEclipse, project right click to see Checkstyle option installed successfullyPmdPMD: Static code analysis tool for automatic detection of potential defects and unsafe or suboptimalThe code.Download
Tags: findbugsDescribed earlier jenkins+gerrit+git build CI system, in fact, there are many useful plug-ins in CI system, these plug-ins can help developers to find the code in the bug or non-standard place. The following is the introduction of CI-related plug-ins
FindBugs: FindBugs is a static analysis tool that examines a class or JAR file to compare bytecode with a set of defect patterns to identify possible problems. With the static analy
PMD is a source code parser. It finds common programming flaws, such as unused variables, empty catch blocks, unnecessary object creation, and so on. It supports Java, JavaScript, Salesforce.com Apex, Plsql, Apache Velocity, XML, XSL, and more.In addition, it includes CPD (copy-paste-detector, copy-paste detector). CPD in Java, C, C + +, C #, Groovy, PHP, Ruby, Fortran, JavaScript, Plsql, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Duplic
WindowsRequirements:
Java JRE 1.5 or higher (see section below for Java JRE 1.4 Support)
WinZip or the free7-zip
Download the latest binary distribution (http://pmd.sourceforge.net/)-I. e., pmd-bin-x.xx.zip
Unzip it into any directory, I. e., D: \ PMD \
========================================================== ========================================================== ==================================
It has been about 4 months since I studied PMD and customized the rules in my work. In fact, PMD has many worthy of my learning source code, but because of time did not have to pen. Today's brief summary of PMD and file filtering design of the source code.1 Public classMultithreadprocessorextendsAbstractpmdprocessor {2 3 PrivateExecutorservice executor;4
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.