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
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
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 \
========================================================== ========================================================== ==================================
CheckStyleCheck the source fileMain focus Format
Check if the Java source file matches the code specification
Mainly include:Javadoc notesNaming conventionsExtra Useless importsA size measure, such as a method that is too longThe necessary space is missing whitespaceDuplicate code
This table goes from: http://blog.csdn.net/ml5271169588/article/details/6975701 As open-source software, we can use it with no fear, wi
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
loop
® Duplicate code: Copy/Paste code means copy/paste bugs
Can be at the following address
Download PMD, and can be in
Rule Set IndexPage to see a preview of all the rules.
At the same time, PMD has been associated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, Codeguide, NetBeans, Sun Java Studio enterprise/creator, IntelliJ Idea, TextPad, Maven, Ant, Gel, JCreator, and Emacs are integrated togethe
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
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
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
: 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 PMD I'm us
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
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/
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 ("
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
Plugin InstallationIf you had previously installed a version of the PMD Eclipse plugin prior to November and then you should remove/uninst All it first. To install the PMD for Eclipse plugin:1. In Eclipse, click on Help, Install New software ...2. Click on Add :3. Enter the following:Name: PMD for Eclipse Update SiteUR
Edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821.zip;2. Extract to "E:\MyEclipse6.5\eclipse\features" and "E:\MyEclipse6.5\eclipse\plugins"; Or the entire edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821 file to plugins, note JDK version, such as 3 can only be above jdk7(2.2. Or online Installation: Help->installnew software--) Click "Add", then in the pop-up "Name" type "findBugs", "Location" input "http://" Findbugs.cs.umd.edu/eclipse can be)3. R
reference jdepend usage instructionsAdd Findbugz Check, detailed configuration reference Findbugz usage instructions,Add Javadoc generation, detailed configuration reference Javadoc usageWith JXR support, JXR is an HTML-formatted tool that generates Java code cross-references and source code, with detailed configuration information referenced JXR usage. Note that JXR is not necessary to run in the build phase. join Cobertura support, which is a code coverage tool that can be used to evaluate th
Tags: myeclipse plug-in Software Installation software reviewRecently, due to the experimental requirements for code review and program performance optimization, need to install some plug-ins under MyEclipse, but because now the MyEclipse version and most of the tutorials are different, some installation options have changed, so it is very cumbersome to install, through constant attempts, Reference and Chop
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
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.