Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Analysis Tools and Inter-Type-Declarations

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)

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

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.

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

Any better ideas?

like image 558
er4z0r Avatar asked Feb 09 '10 08:02

er4z0r


2 Answers

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.

like image 153
Pti. Avatar answered Oct 18 '22 14:10

Pti.


Doubt it will be a "niche problem" for much longer :-) Hopefully the tool vendors will look at the necessary enhancements.

like image 45
Rod Johnnson Avatar answered Oct 18 '22 14:10

Rod Johnnson