3 Creating Custom Output Formats

Any package may add an output format to cover. A format is, roughly, a function that takes coverage information and transforms it into some other format. To add a format put a definition for cover-formats into a packages "info.rkt". This should be a (listof (list command-name module-path function-name)):
  • command-name is a string which will be used as the argument to -c to use this format.

  • module-path should be the path to a racket file providing this format.

  • function-name should be a symbol that is bound to a function in module-path. It should match the contract (->* (coverage/c) (path-string?) any), and is the implementation of the format.

Output formats should log any “verbose” output at the 'debug level to the topic 'cover. These are printed with Cover’s -v flag.