{"size": 1367, "ext": "scrbl", "max_stars_repo_path": "cover/scribblings/plugins.scrbl", "max_stars_repo_name": "jbclements/cover", "max_stars_repo_stars_event_min_datetime": "2015-01-02T15:09:50.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-27T08:37:45.000Z", "max_issues_repo_path": "cover/scribblings/plugins.scrbl", "max_issues_repo_name": "jbclements/cover", "max_issues_repo_issues_event_min_datetime": "2015-01-07T04:16:11.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-19T13:19:06.000Z", "max_forks_repo_path": "cover/scribblings/plugins.scrbl", "max_forks_repo_name": "jbclements/cover", "max_forks_repo_forks_event_min_datetime": "2015-01-06T22:02:24.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-09T19:27:14.000Z"}
{"max_stars_count": 39, "max_issues_count": 132, "max_forks_count": 9, "avg_line_length": 54.68, "max_line_length": 111, "alphanum_fraction": 0.6927578639}
#lang scribble/doc
@(require "base.rkt")

@title[#:tag "plugin"]{Creating Custom Output Formats}

@bold{Warning:} The API presented here is unstable, and may change without warning.

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 @racket[cover-formats] into a packages @filepath["info.rkt"]. This should be a
@racket[(listof (list _command-name _module-path _function-name))]:
@itemize{
         @item{@racket[_command-name] is a string which will be used as the argument to @exec{-c} to
               use this format.}
         @item{@racket[_module-path] should be the path to a racket file providing this format.}
         @item{@@racket[_function-name] should be a symbol that is
               bound to a function in @racket[_module-path]. It should match the contract
               @racket[(->* (coverage/c (listof any/c)) (path-string?) any)], and is the implementation of
               the format. The first argument is the coverage map, the second are the files in the map, and the
               third is the directory to put the coverage in.}
         }

Output formats should log any ``verbose'' output at the @racket['debug] level to the topic
@racket['cover]. These are printed with Cover's @Flag{v} flag.
