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

Actually parse cabal file to find out which files to test. #17

Open
kindaro opened this issue Feb 8, 2018 · 1 comment
Open

Actually parse cabal file to find out which files to test. #17

kindaro opened this issue Feb 8, 2018 · 1 comment

Comments

@kindaro
Copy link
Contributor

kindaro commented Feb 8, 2018

Suppose there are *.hs files in my project that I don't want to, and that in fact couldn't, be tested. For example, it may be a pseudocode draft that doesn't yet parse. Of course, these files would not be included in the cabal package as well.

I then have to create a configuration and list these files as excluded.

However, regard it like this:

  • The only files that we need to test are those included in the project. Let's call them project files.
  • Due to the nature of doctest, the only place that can contain tests for a file is the file itself.

Therefore, we don't need to look for tests anywhere beside project files, which are (or should be) listed in cabal file. The ignore and sourceFolders configuration clauses could thus simply be inferred.

Can we make an option to infer the list of files to test from cabal package definiiton?

@karun012
Copy link
Owner

That would be useful. Shouldn't be too hard to implement. I'll take a look

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