[doc] Add pages from the old "overview" section

This commit is contained in:
Andreas Dangel 2017-07-21 12:15:15 +02:00
parent 6d5f975464
commit 58ea1c7d4f
17 changed files with 1162 additions and 0 deletions

View File

@ -42,6 +42,24 @@ entries:
- title: Getting Help
url: /pmd_help.html
output: web, pdf
- title: PMD in the press
url: /pmd_userdocs_news.html
output: web, pdf
- title: Products/books related to PMD
url: /pmd_userdocs_products.html
output: web, pdf
- title: Similar Projects
url: /pmd_userdocs_similarprojects.html
output: web, pdf
- title: License
url: /license.html
output: web, pdf
- title: Credits
url: /pmd_credits.html
output: web, pdf
- title: What does 'PMD' mean?
url: /pmd_userdocs_meaning.html
output: web, pdf
- title: Rule Reference
output: web, pdf
folderitems:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
docs/images/credits/yjp.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

254
docs/pages/license.md Normal file
View File

@ -0,0 +1,254 @@
---
title: License
sidebar: pmd_sidebar
permalink: license.html
---
This product is licensed under a "BSD-style" license; see below for the full text.
Part of this product (mostly the package net.sourceforge.pmd.lang.vm)
is licensed under the Apache License, Version 2.0;
see below for the full text.
## BSD-style license
<pre>
Copyright (c) 2002-2009, InfoEther, Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The end-user documentation included with the redistribution, if
any, must include the following acknowledgement:
"This product includes software developed in part by support from
the Defense Advanced Research Project Agency (DARPA)"
* Neither the name of InfoEther, LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
## Apache License, Version 2.0
<pre>
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>

View File

@ -9,3 +9,116 @@ folder: pmd/devdocs
* Future direction
* projects, plans
* Google Summer of Code
# Future directions
Want to know what's coming? Or, better, wanna contribute ? Here is the page listing what are our plans -
when we have ones, for the future of PMD. It also give you hints at part of the code we would like to clean -
that you may want to clean to contribute to the project!
Of course, an easy way to contribute is too check out the [bug tracker](https://github.com/pmd/pmd/issues) and see if you can fix some issues -
some could be quite easy, we simply have not the time to look at them all!
At last, if you want to contribute, register on the [pmd-devel](https://sourceforge.net/projects/pmd/lists/pmd-devel) mailing list, and come discuss with us!
## Roadmap
This roadmap contains all the different 'workshops' PMD's developers are working right now.
* **Better symbol analysis**: See below.
* **Data Flow Analysis**: See below.
* **Code Cleanups**: See below.
*Please note that, of course, there is no warranty about when those 'features' will be finished, if they ever are.*
## Better symbol analysis
Currently PMD only looks at one source file at a time. Instead, it should resolve symbols across classes.
This will eliminate some open bugs and enable a lot more rules to be written. However, it'll taken some doing,
because it'll require parsing of class files. Lots of work here.
## Data flow analysis (DFA)
Raik Schroeder, a graduate student at [Fachhochschule Stralsund](http://www.fh-stralsund.de/) has written a DFA layer that should enable
us to write some more complicated rules - stuff like common subexpression elimination, loop invariant code motion
(and code hoisting suggestions), shrink wrapping, and partial redundancy elimination. The code is currently in the `net.sourceforge.pmd.dfa` packages, and we're going through it now figuring out what rules we can write
that use it. We should be able to use it to simplify some current rules, as well.
## Other changes we'll like to see...
**These are things which really should be done, but just haven't been gotten to yet:**
* Enhance Rule Designer to allow testing of the violation suppress Regex and XPath.
* Remove the type resolution specific rules. Merge these back into the
standard rules. In general, a Rule should use TR when it can, and fall
back on non-TR approach otherwise. No need for separate Rules for TR/non-TR.
* Reconcile the util.designer and util.viewer packages. Two versions of the
same thing. Designer is more up to date, but Viewer has a nice MVC design.
* Need a JUnit test to check for "dead" Rules, that is those not used by any RuleSet.
* Rule JUnit tests should verify the Test class follows expected naming
conventions just like the Rules need to.
* Do we have a rule to style check for multiple declarations and chained
assignments? (e.g. int a, b; int a = b = x;)
<strong>These are food for thought, perhaps future items. If you think you'd like to
work on one of these, check with pmd-devel to see what the current thoughts
on the topic.</strong>
* CPD needs work on use of Language. It currently is hardcoded to only
handled Java 1.4. Integrate CPD needs into core PMD where appropriate.
Otherwise, drive CPD behavior based off of core PMD, instead of duplicating
some logic.
* Need a more flexible and powerful scheme for classifying files to various
Languages. At a minimum, should have the ability to specify which
file extensions you want to be used for a language (e.g. not everyone uses
.jsp for JSP extensions, some use .jspx, .xhtml, etc.). Also, consider
hooks into the LanguageVersionDiscoverer process for classifying a
File/String to a LanguageVersion of a specific Language, one could imaging
using a 'magic' system like Unix uses to tell different versions of files
apart based on actual content.
* Should we change Node interface to something like 'Node&lt;T extends Node&lt;T>>',
and then declare the language specific node interfaces to be something like
'JavaNode extends Node&lt;JavaNode>'? This could allow anything on the Node
interface to return the language specific node type instead of generic
node. For example, ASTStatement.jjtGetParent() to return a JavaNode,
instead of a Node. This is a rather huge change, as the Node interface is
one of the pervasive things in the PMD code base. Is the extra work of using
the Node interface with properly with generics, worth the omission of
occasional some casting?
* Should multiple Languages be able to claim a single source file? Imagine
XML format JSP file, for which you've defined a ruleset which uses JSP and
XML rules. Stating that certain XML rules also can map to the JSP language
extensions could be useful. This means Source file to LanguageVersion
mapping is not 1-1, but 1-many, we'd need to deal with this accordingly.
* Additional changes to Rule organization within RuleSets as discussed on
[this forum thread](http://sourceforge.net/p/pmd/discussion/188194/thread/b840897c).
* Figure out a way to allow Rules to deal with parentheses and blocks, which
introduce certain repetitive (and generally ignorable for most Rules)
structures into the AST tree. Some rules are making special effort
(e.g. ConfusingTernaryRule) to detect these AST patterns. Perhaps a
"normalized" AST structure can be created which will make the AST appear
consistent regardless of how many parens are presented, or how many blocks
have been created (e.g. default block inserted, duplicates collapsed).
This should be configurable on per Rule basis similar to TR and SymbolTable.
## Code cleanups
Some of the code is a bit sloppy:
* RuleSetFactory is a mess. It needs to be refactored into something that has layers, or decorators, or something.
* Cleanups would be welcome for ConstructorCallsOverridableMethod and DoubleCheckedLocking
* The Designer GUI is a bit messed up; the bottom panes look funny.
* The grammar has some odd bits:
* BlockStatement has an odd hack for class definitions inside methods
* enumLookahead() seems like a bit of overkill, can it use Modifiers somehow?
* The whole "discardable node" thing seems wasteful
* Does ExtendsList need that 'extendsMoreThanOne' thing?
* ClassOrInterfaceBodyDeclaration has a monstrous lookahead to check for enums
* ClassOrInterfaceType gloms together dotted names... is that the right thing to do?
* Some complicated annotations are currently broken

View File

@ -4,3 +4,28 @@ sidebar: pmd_sidebar
permalink: pmd_best_practices.html
folder: pmd/userdocs
---
## Choose the rules that are right for you
Running every ruleset will result in a huge number of rule violations, most of which will be unimportant.
Having to sort through a thousand line report to find the few you're really interested in takes
all the fun out of things.
Instead, start with some of the obvious rulesets - just run [unusedcode](../pmd-java/rules/index.html#Unused_Code) and fix any unused locals and fields.
Then, run [empty](../pmd-java/rules/index.html#Empty_Code) and fix all the empty `if` statements and such-like. After that, take [unnecessary](../pmd-java/rules/index.html#Unnecessary)
and fix these violations. Then, run [basic](../pmd-java/rules/index.html#Basic) and fix the remaining violations.
Then peruse the [design](../pmd-java/rules/index.html#Design) and [controversial](../pmd-java/rules/index.html#Controversial) rulesets and use the ones
you like [via a custom ruleset](../customizing/howtomakearuleset.html).
## PMD rules are not set in stone
Generally, pick the ones you like, and ignore or [suppress](../usage/suppressing.html) the warnings you don't like. It's just a tool.
## PMD IDE plugins are nice
Using PMD within your IDE is much more enjoyable than flipping back and forth
between an HTML report and your IDE. Most IDE plugins have the "click on the rule
violation and jump to that line of code" feature. Find the PMD plugin for your IDE, install it,
and soon you'll be fixing problems much faster.
Suggestions? Comments? Post them [here](https://github.com/pmd/pmd/issues). Thanks!

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
---
title: What does 'PMD' mean?
sidebar: pmd_sidebar
permalink: pmd_userdocs_meaning.html
folder: pmd/userdocs
---
We've been trying to find the meaning of the letters PMD - because frankly, we don't
really know. We just think the letters sound good together.
However, in the spirit of the Computing Industry, we have come up with several "backronyms" to explain it.
**PMD...**
* Pretty Much Done
* Project Mess Detector
* Project Monitoring Directives
* Project Meets Deadline
* Programming Mistake Detector
* Pounds Mistakes Dead
* PMD Meaning Discovery (recursion, hooray!)
* Programs of Mass Destruction
* Programming Meticulous coDe
* [A 'Chaotic Metal' rock band name](http://www.myspace.com/prettymarydies)

View File

@ -0,0 +1,93 @@
---
title: PMD in the press
sidebar: pmd_sidebar
permalink: pmd_userdocs_news.html
folder: pmd/userdocs
---
## Sites/Articles about PMD
* February 2012 - Romain Pelisse's lightning talk at FOSDEM 2012 about "PMD5: What can it do for you?".
[Video recording is available](http://video.fosdem.org/2012/lightningtalks/PMD5.webm).
* May 2008 - Alan Berg's article on
[Free Software Magazine](http://www.freesoftwaremagazine.com/columns/destroy_annoying_bugs_part_1)
discusses FindBugs, PMD, and TFTP.
* July 2007 - Ryan Slobojan's article on [InfoQ](http://www.infoq.com/news/2007/07/pmd)
discusses the PMD 4.0 release.
* October 2006 -Alan Berg's article "Light On Java Code" in
[Software Testing and Performance Magazine [link broken]](http://www.stpmag.com/issues/stp-2006-10.pdf)
discusses static code analysis using FindBugs and PMD.
* July 2006 - Paul Duvall's article "Automation for the people: Continuous Inspection" on
[developerWorks](http://www-128.ibm.com/developerworks/java/library/j-ap08016/index.html) discusses CPD.
* June 2006 - Andrew Glover's article "In pursuit of code quality: Tame the chatterbox" on
[developerWorks](http://www-128.ibm.com/developerworks/java/library/j-cq06306/index.html?ca=drs-)
discusses PMD and JavaNCSS.
* June 2006 - Tom Copeland's article "Static Electricity: Better Living with Static Code Analysis" in
[Better Software](http://tomcopeland.blogs.com/juniordeveloper/2006/06/a_pmd_analysis_.html) discusses
PMD/CPD analyses of Azureus and Columba.
* April 2006 - John Ferguson Smart's article "PMD Squashes Code Bugs" on
[DevX](http://www.devx.com/Java/Article/31286) discusses PMD and the Eclipse plugin. Lots of screenshots!
* November 2005 - Mike Clark's article "Staying Out of Code Debt" on
[StickyMinds](http://www.stickyminds.com/sitewide.asp?Function=edetail&amp;ObjectType=ART&amp;ObjectId=9860&amp;tth=DYN&amp;tt=siteemail&amp;iDyn=2)
mentions both PMD and CPD as useful code-checking tools.
* October 2005 - Levent Gurses' article "Improving Code Quality with PMD and Eclipse" in
[EclipseZone](http://www.eclipsezone.com/articles/pmd/) talks about the PMD Eclipse plugin and explains many
different facets of PMD - XPath, writing rules, the AST, all that. Good stuff!
* June 2005 - Amit Chaturvedi's article "Java & Static Analysis" in
[Doctor Dobb's Journal](http://www.drdobbs.com/jvm/java-static-analysis/184406143) talks about PMD and shows a
screenshot of the rule designer
* March 2005 - Kirk Knoernschild's article "Benefits of the Build" in
[Doctor Dobb's Journal](http://www.drdobbs.com/benefits-of-the-build/184415286) mentions PMD as a way
to automate code reviews
* February 2005 - [Java Is Well-Suited for Open-Source Projects](http://www.eweek.com/c/a/Application-Development/Java-Is-WellSuited-for-OpenSource-Projects/) -
Peter Coffee's eWeek article on open source, Java, and PMD
* January 2005 - [Zap bugs with PMD](http://www.ibm.com/developerworks/java/library/j-pmd/) - Elliotte Rusty
Harold's article on installing, configuring, and running PMD
* November 2004 - [PMD: A code analyzer for Java programmers](http://archive09.linux.com/feature/40235) - Daniel
Rubio's article about PMD; includes some notes on XPath rules
* June 2004 - [Code Improvement Through Cyclomatic Complexity](http://onjava.com/pub/a/onjava/2004/06/16/ccunittest.html) -
Andrew Glover's CCM article featuring PMD
* June 2004 - [Open Source-Perlen](http://tinyurl.com/3dgpe) - A German article on PMD in Java Magazin
* June 2004 - [Improving Project Quality with PMD](http://jnb.ociweb.com/jnb/jnbJun2004.html) - Tom Wheeler's
"Java News Brief", June 2004 issue
* February 2004 - [Software Development](http://www.drdobbs.com/free-as-in-freedom/184415103) - Listed as one of
their 'Open-Source Projects to Watch'
* November 2003 - [JavaWorld: "Bug patrol"](http://www.javaworld.com/javaworld/jw-11-2003/jw-1121-quality.html) -
Various code inspection tools
* [JJGuidelines - Java and J2EE Conventions, Guidelines and Best Practices [link broken]](https://jjguidelines.dev.java.net/index.html) -
a project sponsored by the Belgian government to codify coding practices; uses PMD as the compliance checking utility
* June 2003 - [Software Development Times [link broken]](http://www.sdtimes.com/news/080/story15.htm) - PMD
is embedded in QStudio.
* May 2003 - [techrepublic.com](http://www.techrepublic.com/article/three-tools-that-make-java-code-review-painless-and-effective/5031836) -
PMD, Checkstyle, and Jalopy
* April 2003 - [O'Reilly OnJava.com](http://onjava.com/pub/a/onjava/2003/04/09/pmd_rules.html) - PMD custom rules
* March 2003 - [O'Reilly OnJava.com](http://onjava.com/pub/a/onjava/2003/03/12/pmd_cpd.html) - overview of CPD
* February 2003 - [O'Reilly OnJava.com](http://onjava.com/pub/a/onjava/2003/02/12/static_analysis.html) - overview of PMD
* January 2003 - [Sprout](http://netbeans.org/community/articles/interviews/tom_copeland_ole-martin_fr.html) -
interview with Ole-Martin and Tom

View File

@ -0,0 +1,56 @@
---
title: Products/books related to PMD
sidebar: pmd_sidebar
permalink: pmd_userdocs_products.html
folder: pmd/userdocs
---
## Open source products
* <a href="http://jbrugge.com/glean/index.html">Glean</a> - Aggregates PMD + numerous other source code feedback tools
* <a href="http://qalab.sf.net">QALab</a> - Aggregates PMD + Checkstyle + FindBugs and tracks problems over time
* <a href="http://xradar.sf.net">XRadar</a> - Using PMD, CPD, and lots of other projects to give measurements on
standard software metrics such as package metrics and dependencies, code size and complexity, code duplications,
coding violations and code-style violations.
## Commercial products
* <a href="http://www.vanwardtechnologies.com/products.php">Vanward Technology's Convergence [link broken]</a> -
a quality management dashboard for the Java platform. Thanks to Vanward Technologies for their support of PMD
by buying copies of <a href="http://pmdapplied.com/">PMD Applied</a>!
* <a href="http://javacentral.compuware.com/products/optimaladvisor/">Compuware's OptimalAdvisor [link broken]</a>
<a href="http://www.componentsource.com/beasv/products/compuware-optimaladvisor/index.html">OptimalAdvisor from ComponentSource</a> -
static code analysis and refactoring tool
## Books that mention PMD
* <a href="http://pmdapplied.com">PMD Applied</a> - the official manual; get an extra copy for the home!
Or office! Whatever!
* <a href="http://www.oreilly.com/catalog/9780596510237">Checking Java Programs</a> - by Ian Darwin;
also discusses FindBugs.
* <a href="http://www.amazon.com/gp/product/0321286081">Sustainable Software Development: An Agile Perspective</a> -
by Kevin Tate, discusses both PMD and CPD
* <a href="http://www.amazon.com/gp/product/0321375777">High-Assurance Design: Architecting Secure and Reliable Enterprise Applications</a> -
by Cliff Berg, mentions PMD in a discussion of static analysis utilities
* <a href="http://www.amazon.com/gp/product/0321288157">Eclipse Distilled</a> - by David Carlson,
discusses the PMD plugin
* <a href="http://www.oreilly.com/catalog/9780596007508">Maven: A Developer's Notebook</a>, co-authored by
Vincent Massol, who's done a bunch of work on PMD. Thanks Vincent!
* <a href="http://www.amazon.com/gp/product/0596007949">Network Security Tools</a>, chapter 6 discusses using PMD
to catch web app security problems. Thanks to Joseph Hemler for the props!
* <a href="http://www.amazon.com/gp/product/0672325624">Extreme Programming With Ant</a>
## Articles
* <a href="http://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-105/Verifier-votre-code-Java-avec-PMD">An introduction
to PMD (in French)</a>

View File

@ -0,0 +1,73 @@
---
title: Similar projects
sidebar: pmd_sidebar
permalink: pmd_userdocs_similarprojects.html
folder: pmd/userdocs
---
## Similar to PMD
### Open Source
* <a href="http://checkstyle.sourceforge.net/">Checkstyle</a> - Very detailed, supports both Maven and Ant.
Uses ANTLR.
* <a href="http://doctorj.sourceforge.net">DoctorJ</a> - Uses JavaCC. Checks Javadoc, syntax and calculates metrics.
* <a href="http://web.archive.org/web/20110721133755/http://kind.ucd.ie/products/opensource/ESCJava2/">ESC/Java</a> -
Finds null dereference errors, array bounds errors, type cast errors, and race conditions.
Uses Java Modeling Language annotations.
* <a href="http://findbugs.sourceforge.net/">FindBugs</a> - works on bytecode, uses BCEL. Source code uses
templates, nifty stuff!
* <a href="http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/products/hammurapi/index.html">Hammurapi</a> -
Uses ANTLR, excellent documentation, lots of rules
* <a href="http://grothoff.org/christian/xtc/jamit/">Jamit</a> - bytecode analyzer, nice graphs
* <a href="http://jcsc.sourceforge.net/">JCSC</a> - Does a variety of coding standard checks, uses JavaCC and
the GNU Regexp package.
* <a href="http://jikes.sourceforge.net/">Jikes</a> - More than a compiler; now it reports code warnings too
* <a href="http://jlint.sourceforge.net/">JLint</a> - Written in C++. Uses data flow analysis and a lock graph to
do lots of synchronization checks. Operates on class files, not source code.
* <a href="http://javapathfinder.sourceforge.net/">JPathFinder</a> - A verification VM written by NASA;
supports a subset of the Java packages
* <a href="http://csdl.ics.hawaii.edu/research/jwiz/">JWiz</a> - Research project, checks some neat stuff, like if
you create a Button without adding an ActionListener to it. Neat.
### Commercial
* <a href="http://www.appperfect.com/products/java-code-test.html">AppPerfect</a> - 750 rules,
produces PDF/Excel reports, supports auto-fixing problems
* <a href="http://web.archive.org/web/20070227171100/http://www.tcs.com/0_products/assent/assent_rules.htm#java">Assent</a> -
The usual stuff, seems pretty complete.
* <a href="http://web.archive.org/web/20060823080607/http://www.alajava.com/aubjex/products.htm">Aubjex</a> -
Rules aren't listed online. Appears to have some code modification stuff, which would be cool to have in PMD. $299.
* <a href="http://www.andiz.de/azosystems/en/index.html">AzoJavaChecker</a> - Rules aren't listed online so it's
hard to tell what they have. Not sure how much it costs since I don't know German.
* <a href="https://developers.google.com/java-dev-tools/codepro/doc/">CodePro AnalytiX</a> -
Eclipse plug-in, extensive audit rules, JUnit test generation/editing, code coverage and analysis
* <a href="http://www.enerjy.com/static-analysis.html">Enerjy Java Code Analyser</a> - 200 rules,
lots of IDE plugins
* <a href="http://www.excelsior-usa.com/fd.html">Flaw Detector</a> - In beta, does control/data flow analysis
to detect NullPointerExceptions
* <a href="http://www.mmsindia.com/jstyle.html">JStyle</a> - $995, nice folks, lots of metrics and rules
* <a href="http://www.parasoft.com/jsp/products/jtest.jsp">JTest</a> - Very nice with tons of features,
but also very expensive and requires a running X server (or Xvfb) to run on
Linux. They charge $500 to move a license from one machine to another.
* <a href="http://www.jutils.com/index.html">Lint4J</a> - Lock graph, DFA, and type analysis, many EJB checks
* <a href="http://www.solidsourceit.com/products/SolidSDD-code-duplication-cloning-analysis.html">SolidSDD</a> - Code
duplication detection, nice graphical reporting. Free licensing available for Educational or OSS use.
## Similar to CPD
### Commercial
* <a href="http://www.harukizaemon.com/simian/">Simian</a> - fast, works with Java, C#, C, CPP, COBOL, JSP, HTML
* <a href="http://blue-edge.bg/download.html">Simscan</a> - free for open source projects
## High level reporting
* <a href="http://xradar.sourceforge.net">XRadar</a> - Agregates data from a lot of code quality tool to generate
a full quality dashboard.
* <a href="http://www.sonarsource.com/">Sonar</a> - Pretty much like XRadar, but younger project, fully integrated
to maven 2 (but requires a database)
* <a href="http://mojo.codehaus.org/dashboard-maven-plugin/">Maven Dashboard</a> - Same kind of agregator but
only for maven project.
* <a href="http://qalab.sourceforge.net/">QALab</a> - Yet another maven plugin...