您的位置:首页 > 编程语言 > Java开发

Java代码检测工具PMD规则集翻译合集

2010-01-27 11:09 549 查看
以下内容为 PMD 检查规则及翻译,错漏之处在所难免,欢迎指正!—— jack0511

PMD是一个JAVA代码检查工具,官方主页: http://pmd.sourceforge.net/
它的规则集主要包含:(点击链接进入具体内容及翻译

Basic Rules : The Basic Ruleset contains a collection of good practices which everyone should follow.

Braces Rules : The Braces Ruleset contains a collection of braces rules.

Clone Implementation Rules : The Clone Implementation ruleset contains a collection of rules that find questionable usages of the clone() method.

Code Size Rules : The Code Size Ruleset contains a collection of rules that find code size related problems.

Controversial Rules : The Controversial Ruleset contains rules that, for whatever reason, are considered controversial. They are separated out here to allow people to include as they see fit via custom rulesets. This ruleset was initially created in response to discussions over UnnecessaryConstructorRule which Tom likes but most people really dislike :-)

Coupling Rules : These are rules which find instances of high or inappropriate coupling between objects and packages.

Design Rules : The Design Ruleset contains a collection of rules that find questionable designs.

Finalizer Rules : These rules deal with different problems that can occur with finalizers.

Import Statement Rules : These rules deal with different problems that can occur with a class' import statements.

J2EE Rules : These are rules for J2EE

JavaBean Rules : The JavaBeans Ruleset catches instances of bean rules not being followed.

JUnit Rules : These rules deal with different problems that can occur with JUnit tests.

Jakarta Commons Logging Rules : The Jakarta Commons Logging ruleset contains a collection of rules that find questionable usages of that framework.

Java Logging Rules : The Java Logging ruleset contains a collection of rules that find questionable usages of the logger.

Migration Rules : Contains rules about migrating from one JDK version to another. Don't use these rules directly, rather, use a wrapper ruleset such as migrating_to_13.xml.

Naming Rules : The Naming Ruleset contains a collection of rules about names - too long, too short, and so forth.

Optimization Rules : These rules deal with different optimizations that generally apply to performance best practices.

Strict Exception Rules : These rules provide some strict guidelines about throwing and catching exceptions.

String and StringBuffer Rules : These rules deal with different problems that can occur with manipulation of the class String or StringBuffer.

Security Code Guidelines : These rules check the security guidelines from Sun, published at http://java.sun.com/security/seccodeguide.html#gcg
Type Resolution Rules : These are rules which resolve java Class files for comparisson, as opposed to a String

Unused Code Rules : The Unused Code Ruleset contains a collection of rules that find unused code.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: