我可以自定义 Eclipse 的 PMD 吗?
我们知道PMD是与eclipse集成的。我想定制它。 假设我希望所有变量都以小写字母开头 或者说我希望所有方法名称都超过 8 个字符等。 可以这样做吗?
有谁知道 PMD 代表什么?
We know that PMD is integrated with eclipse. And i want to customize it.
say suppose i want all variables to start with small letter
or say i want all method name to be more than 8 characters or so on.
is it possible to do that?
And does anyone know what PMD stands for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 PMD 编写新规则。
就您而言,新的 XPath 规则 足以快速检查 AST(抽象语法树)并执行您需要的检测类型。
(来源:sourceforge.net)
所以你可以声明新规则集并将它们集成到您的 Eclipse 以及您的 PMD 插件。
注意:PMD 代表很多东西 ;)
You can write new Rules with PMD.
In your case, new XPath Rules would be adequate to quickly examine the AST (Abstract Syntax Tree) and perform the kind of detection you need.
(source: sourceforge.net)
So you can declare new ruleset and integrate them in your eclipse along with your PMD plugin.
Note: PMD stands for many things ;)