You mean, can Checkstyle detect something like List list = new ArrayList();
as missing generic type arguments.
No, Checkstyle can't do that because it works only on the Java source files, so it would not know if the List
you are referencing has type parameters or not. Checkstyle would have to determine the binary class name of List
, and locate its source, which may not even be available in many cases.
FindBugs may be able to do that, as it works on the compiled .class files. I don't know of a FindBugs rule which covers exactly your case, but there are other FindBugs rules related to generics.