Hi!
I am looking for a way to detect certan patterns in our project's code.
For example I'd like to find all occurences of something like
LOOP
|
+-- CLASS_INSTANCEOF_CERTAINSUPERCLASS.METHODCALL
I. e. I'd like to find out, if and where someone calls methods of
classes of a certain superclass in any kind of loop, because usually
those classes contain only methods that should be called with caution.
Would Checkstyle be suitable? As far as I have seen it concentrates on
syntactic problems, but for the "instanceof" check I'd have to have a
little more of a semantic means of checking.
I'd be happy to hear about any other tool (preferrably with Eclipse
integration) or way to find such things.
Daniel
bugbear - 27 Jan 2005 13:46 GMT
> Hi!
>
[quoted text clipped - 8 lines]
> classes of a certain superclass in any kind of loop, because usually
> those classes contain only methods that should be called with caution.
take a look at findbug, which does something similar and is
extensible/customisable
BugBear
Andrea Desole - 27 Jan 2005 14:33 GMT
> take a look at findbug, which does something similar and is
> extensible/customisable
Maybe you meant FindBugs?
http://findbugs.sourceforge.net/
Daniel Schneller - 27 Jan 2005 14:35 GMT
> Maybe you meant FindBugs?
>
> http://findbugs.sourceforge.net/
Thank you!
I will take a look at it. Any other hints/suggestions would still be
highly appreciated :)
Daniel
Andrea Desole - 27 Jan 2005 14:47 GMT
> Thank you!
> I will take a look at it. Any other hints/suggestions would still be
> highly appreciated :)
Forgot to mention that: I just heard someone talking about PMD, but I
don't know that much about it (don't know that much about FindBugs either):
http://pmd.sourceforge.net/
bugbear - 28 Jan 2005 14:13 GMT
>> take a look at findbug, which does something similar and is
>> extensible/customisable
>
> Maybe you meant FindBugs?
>
> http://findbugs.sourceforge.net/
(see recursion :-)
BugBear
Andrew McDonagh - 27 Jan 2005 20:06 GMT
> Hi!
>
[quoted text clipped - 17 lines]
>
> Daniel
Take a look at PMD, there's loads of rules supplied and you can write
your own too.
http://pmd.sourceforge.net/