As a part of the regular static analysis of my program, I would like to check that classes are likely to have sane toString()
methods. Probably not that every class implements them, but perhaps that no instantiable concrete class uses Object
's implementation of toString()
.
Is there a lint toolkit that checks for this? The ones I currently use are FindBugs and CheckStyle; I haven't found an obvious way to check using either of those. I'm also looking at adding PMD to my lint suite, and would be open to something in Sonar as well. So I would prefer to do it using a tool already in my tool chest, but if I need to add yet another tool I will consider it.