Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider usefulness of JSON configuration #15

Open
pbrisbin opened this issue Dec 22, 2017 · 3 comments
Open

Consider usefulness of JSON configuration #15

pbrisbin opened this issue Dec 22, 2017 · 3 comments

Comments

@pbrisbin
Copy link
Contributor

I almost always want to modify the sourceFolders option. I never want to add ignores; in fact, I'd argue ignoring tests is an anti-pattern.

Therefore, I propose removing the JSON-based configuration and instead support usage like:

{-# OPTIONS_GHC -F -pgmF doctest-discover -optF app -optF library #-}

As the (only) means of configuration, to override the default of -optF src.

If you agree, I'm happy to open a PR implementing this.

@karun012
Copy link
Owner

karun012 commented Dec 25, 2017 via email

@pbrisbin
Copy link
Contributor Author

We could keep backwards compatibility, and the ignore feature, by supporting two usages:

doctest-discover [CONFIG]
doctest-discover [--ignore PATTERN, ...] [DIRECTORY, ...]

It would require a more complex options-parser, but not much other downside I see.

My main motivation is that I don't like cruft in my source tree, so I'd prefer I can fully configure the doctest target within the single Haskell module, rather than also requriing a sidecar JSON file.

@karun012
Copy link
Owner

karun012 commented Dec 29, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants