Jouni K Seppänen
-
2011-05-20
(This addresses partially the same problem as #3304991 in a different way, but IMHO both are worth applying.)
Since Cobertura is implemented via instrumenting class files, it is to some degree usable for JVM languages other than Java. However, applying Java code colorization to non-Java code will result in nonsensical output. It is better to view e.g. Clojure source without any colorization than with mistaken colorization. This patch looks at the filename of the source file, and if it does not end in .java, does not attempt to apply colorization.
The copyright to this patch belongs to my employer, ZenRobotics Ltd., and I have received permission to submit the patch to Cobertura. The patch is against Subversion branch v1_9_4.