florence / cover

a code coverage tool for racket
MIT License
38 stars 7 forks source link

Allow multiple output formats, by specifying `f` several times #111

Closed SuzanneSoy closed 8 years ago

SuzanneSoy commented 8 years ago

Use-case:

raco cover -f html -f coveralls file.rkt

Note that I didn't add a test for that case, but since the only two output formats I know of are html and coveralls, it doesn't seem like to make much sense to run coveralls on a test file, does it?

SuzanneSoy commented 8 years ago

I removed the define/contract (and reverted the (require racket/contract/base)). get-formats already wraps its results in a contract, did you mean that something else should be done?

Concerning output-formats always being a list, the first occurrence of -f should clear the default value, and subsequent occurrences will add to the list. Right now I'm distinguishing the default value because it's not a list, so if I were to make it always be a list (not a breaking change, as you say it's not exposed to the API), then I suppose I would need to add an extra boolean to track whether it's the default value or not. Should I do that?

florence commented 8 years ago

Fair enough, merged!