UnkindPartition / tasty

Modern and extensible testing framework for Haskell
640 stars 110 forks source link

Duplicate command-line options #292

Closed Bodigrim closed 3 years ago

Bodigrim commented 3 years ago

if there is more than one TestReporter then --help lists -j,--num-threads several times:

https://github.com/feuerbach/tasty/blob/23d856cdce96dd71b825490da30b4338a4f0a582/core/Test/Tasty/Ingredients.hs#L108-L115

Similarly, if the same command-line option is shared between several providers / ingredients, it ends up reported multiple times as well:

https://github.com/feuerbach/tasty/blob/23d856cdce96dd71b825490da30b4338a4f0a582/core/Test/Tasty/Ingredients.hs#L119-L123

Cf. https://github.com/Bodigrim/tasty-bench/issues/3

I'm happy to raise a PR fixing this, but unsure about approach. Should we try to preserve the order of options? Or throwing everything in a Set and getting back alphabetically sorted will do?

UnkindPartition commented 3 years ago

Let's try to preserve the order. We could use something like this.