General Principles
Understand how PMD works:
- does not compile the code
- does not run the code
- analyzes one .java file at a time
- works using the Abstract Syntax Tree (AST)
Not covered: No knowledge about javacc and jjtree is required.
Vocabulary and Concepts
Define the PMD specific meaning of the terms:
- rule
- ruleset
- violation
- report
- warning
- priority
Not covered:
- Parameter names (e.g. "threshold", "minimum")
Configuration
Custom Rulesets, Suppressing warnings, Output, ...
Packaged Rulesets
PMD comes with a large number of rules, grouped into rulesets.
For each ruleset, identify
- the code matched by each rule,
- the potential problem with the code,
- how to fix it
Not covered:
- Code Size
- Clone
- Controversial
- Coupling
- Finalizers
- J2EE
- Javabeans
- JUnit Tests
- Logging (Java)
- Logging (Jakarta)
- Migrating
- Optimizations
- Sun Security
- Java Server Pages
- Java Server Faces
Below is a brief description of each ruleset.
分享到:
相关推荐
pmd-18t载体序列 完整序列!!生物技术
可以利用p3c-pmd-2.0.0.jar来实现基于阿里代码规约的代码规范检测。执行命令: $JAVA_HOME/bin/java -Dpmd.language=en -cp $BASE_PATH/p3c-pmd-2.0.0.jar net.sourceforge.pmd.PMD -d $TEMPDIR -R rulesets/java/...
pmd-bin 静态代码分析工具 PMD是静态源代码分析器。 它发现常见的编程缺陷,例如未使用的变量,空的catch块,不必要的对象创建等。 它主要涉及Java和Apex,但支持其他六种语言。 PMD具有许多内置检查(以PMD术语,...
阿里巴巴java开发规范集成sonar扫描
sonar-pmd-plugin-2.6.jar sonar-pmd-plugin-2.6.jar sonar-pmd-plugin-2.6.jar sonar-pmd-plugin-2.6.jar sonar-pmd-plugin-2.6.jar
example : java -Dfile.encoding=utf-8 -cp p3c-pmd-1.3.6.jar net.sourceforge.pmd.PMD -d test.har -R rulesets/java/ali-comment.xml
maven-pmd-plugin-1.8.jar
阿里巴巴Java代码质量检测插件:p3c-pmd-2.1.1.jar https://github.com/alibaba/p3c
sonarqube8.4,sonar规则包含pmd-java6.15.0和p3c-pmd2.1.0 可结合教程进行增删改自定义规则
maven-pmd-plugin-2.4.jar
maven-pmd-plugin-1.0.jar
sonarqube4.5.7对应pmd插件 sonar-pmd-plugin-2.2 /sonarqube-4.5.7/extensions /plugins下 重启
sonarqube-4.5.4 安装教程,,持续集成,,持续 集成篇SonarQube代码质量管理平台的安装-sonarqube-4.5.4
阿里p3c代码规范
统计Java代码覆盖和重复数量等工具,貌似为开源代码(我也是从sourceforget下载的),估计需要反编译
P3C阿里云的插件,github地址:https://github.com/alibaba/p3c 此处我们用到p3c-pmd插件,需要打包成jar文件,以便gitlab服务端使用; 已经打好包,方便直接拿去使用
PMD-CTI100电缆测试仪说明书
pmd5.2.3,2015年的。要的就下了
PMD源代码分析工具。
静态代码扫描工具,用于辅助开发定义java开发规范的.