开发者

need java pmd rule for comments in myeclipse

i am trying to write a java pmd rule to check source code comments. The rule shou开发者_JAVA技巧ld be able to identify all the method and variable declarations. If any method/variable declares without comment, the rule should give a warning as method/variable created without comments. any idea will be appreciated.......!


Unfortunately it's not possible with PMD because XPath expressions are working on the Abstract Syntax Tree (AST) and AST does not contain comments. Maybe Checkstyle would be a better candidate for this task.

(You can check this with a PMD plugin in Eclipse. Right click on a class which contains some comments, PMD / Generate Abstract Syntax Tree, then search in the generated ast file for your comments. There is no sign of any of them.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜