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 source programs, such as unused variables, e
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
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 > Install New software >In the pop-up window, enter
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
1. decompress the package;2, cd./qatools/pmd-bin-5.0.4/bin3. Modify exec_pmd.sh to modify the directory to be checked.
Take useless code check as an example. The original content is:./run. sh pmd-d/home/wuhe. jyh/xxx/yyy/-rulesets java-unusedcode> unusedcode.txt
The red font part is the directory to be checked. The source code is checked by the pmd component. you
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 into eclipse. The functions of the three are sho
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 ++. It is said that Microsoft regards PC lint review with no errors or warnings as the firs
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
Java advanced (iv) ------ java programming specifications --- installation of FindBugs, PMD, and CheckStyle code quality detection tools
Here, the plug-in is used to install FindBugs, PMD, and CheckStyle for myeclipse.
You can search for checkstyle, pmd, and findbugs to find their corresponding plug-ins.
There are three installation methods for plug-ins. I
Plug-in installation address https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/
Detailed Enquiry: https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/
If you had previously installed a version of the PMD Eclipse plugin prior to November and then you shou
Before formally entering the test, it is helpful to do some static code analysis and code review to improve the quality and the system, the above is the data proofPMD It is a Java source code parser based on a static rule set that identifies potential problems such as:– Possible bug--empty try/catch/finally/switch blocks.– Useless codes (Dead code): Useless local variables, method arguments, and private methods.– An empty If/while statement.– Overly complex expressions-unnecessary if statements,
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 "fielddeclarationsshouldbeatstartofclass" rule in th
1. Build Jenkins
Reference: Http://blog.csdn.net/xiaofei125145/article/details/51144827?locationNum=1 2, install DRY plugin
DRY Plug-in
3. Download PMD
https://sourceforge.net/projects/pmd/files/pmd/4, decompression PMD and placed in the designated directory
I placed it in the ~/p
Recently because of the experimental requirements for code review and program performance optimization, need to install some plug-ins under the MyEclipse, but because the current MyEclipse version and most of the tutorial is not the same, some installation options have changed, so the installation is very troublesome, through constant attempts, Reference and chopping tutorials and on the basis of their own practice, sorted out about Checkstyle, PMD, f
1) failed to check with multiple rule sets at a time
Command line:
E:/software/pmd-2.3/bin> pmd c:/test. Java HTML rulesets/unusedcode. XML, rulesets/basic. xml
Running result:
Sample source code:
Import java. util. arraylist;
Import java. util .*;
Public class test {
Public static void main (string [] ARGs ){
Try {
Int I = 0;
If (I> 0 ){}
System. Out. println ("Hello world! ");
} Catch (exception e ){
} Fi
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, Eclipse, JEdit, JBuilder, BlueJ, Codeguide, Netbean
I. Installation and Use of PMD(1) Installation of PMD-Online Installation1. Open eclipse and select help-install new software.2. In the pop-up install dialog box, select the Add button3. Fill in the plug-in name: PMD in name, and enter the plug-in address: http://sourceforge.net/projects/pm/files/pmd-eclipse/update-sit
PMD and Checkstyle
Depending on the PMD document, it checks the following sections in your code:
Unused local variablesAn empty catch blockParameter not usedEmpty if statementDuplicate import statementUnused private methodsCould be a singletons class.Short/Long variable and method nameCheckstyle Check the following sections:
Javadoc annotationNaming conventionsTitleImport statementVolume sizeBlankModifiersB
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.