-
Suggestion
-
Resolution: Won't Fix
-
None
Create a Service Provider Interface for Clover, which will allow to attach new source code and/or byte code instrumenters. It will allow us to create a pluggable architecture so that new programming languages (e.g. Scala, JRuby, Jython, Closure) could be supported.
Rough idea:
- new language instrumenters can be attached by META-INF/services
- they can provide some callback like canInstrument(File) or canInstrument(InstrumentationSource)
- clover shall pass file/instrumentation source to such instrumenter together with Clover's configuration and an open instrumentation session
- extension instruments on its own calling session.enterXyz()/exitXyz() methods
- extension writes output file on its own
- language instrumenter could work also with an Abstract Syntax Tree (e.g. Groovy or Scala - we may need a different way of attaching here)
- new language renderers can be attached by META-INF/services - move to another issue?