本文介绍了代码分析工具和类型间声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由Spring Roo生成的maven项目,并使用几个工具(checkstyle,pmd等)来收集有关我的项目的信息。 (即我正在使用)

I have a maven project generated by Spring Roo and use several tools (checkstyle, pmd etc.) to collect information about my project. (namely I am using codehaus' sonar for this)

分离持久性,javabeans-getter / setter等问题。

Roo makes heavy use of AspectJ Inter Type Declarations (ITD) to seperate concerns like persistence, javabeans-getter/setters etc.

这些ITD在编译时编织,所以像checkstyle和pmd这样的工具(谁工作)在源级别上有很多误报。

These ITDs are woven in at compile-time so tools like checkstyle and pmd (who work on source-level) have a lot of false positives.

我目前看到的唯一解决方案是停用对使用ITD的类的检查。

The only solution I currently see, is to deactivate checks for Classes that use ITDs.

任何更好的想法?

推荐答案

这个答案对你现在没有帮助,但希望它可能会对您感兴趣,因为它承诺在不久的将来解决您的问题。
我不知道您是否了解JetBrains的IntelliJ IDEA - Java IDE,但是已经在这方面做了工作,这里是您可能想要遵循的专用问题的链接:。只需设置一个手表 - 并在功能实施时得到通知。
IntelliJ IDEA提供非常强大的SCA。因此,ITD支持也应该具有高质量。

This answer would not help you right now, but hopefully it can be of interest for you, as it promises solution for your problem in a near future.I don't know whether you know IntelliJ IDEA - Java IDE from JetBrains, but there is already work being done in this direction, and here is the link to the dedicated issue that you might want to follow: http://youtrack.jetbrains.net/issue/IDEA-26959. Just set a watch on it - and get notified when the feature is implemented.IntelliJ IDEA provides really powerful SCA. So, ITD support should be of a high quality as well.

这篇关于代码分析工具和类型间声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-09 21:48