Using Clover for other programming languages
Clover works with Java and Groovy languages. If you have code written in other programming languages, you could potentially generate XML/HTML/PDF/JSON reports for them as well. However, there are some prerequisites:
- you have another code coverage tool for that language (for example Cobertura or Emma for JVM languages)
- a structure of this programming language can be somehow mapped to the java/groovy-like structure (file-class-method-statement)
- you know the data format of the another code coverage tool
If all prerequisites are fulfilled, you could write a data converter from that coverage tool to Clover's database format.
- All you need to do is to load Clover database and call certain callback methods to fill the database with actual data. See the Database Structure page for more details.
As soon as you have the data converter ready, you could run it within your build to generate Clover database. You could also merge the resulting database with a database generated by Clover for Java/Groovy sources - thanks to this you could have a single, consolidated report. Next you can run Clover reporting tools to get reports you need.
And how the HTML report would look like for an unknown language? Well, you would see classes and methods as usual, but it Clover would use a plain text formatter for a source page (Clover has syntax highlighters for Java and Groovy only).