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

Filter out errors and warnings for other files #11

Open
dag opened this issue Feb 13, 2013 · 2 comments
Open

Filter out errors and warnings for other files #11

dag opened this issue Feb 13, 2013 · 2 comments

Comments

@dag
Copy link

dag commented Feb 13, 2013

I think since the check command is per file (not project), output for other files should be filtered out:

$ hdevtools check -g-isrc src/Kibr/CLI.hs 
src/Kibr/State.hs:123:46:
    Not in scope: `^..'
    Perhaps you meant `^.' (imported from Control.Lens)
src/Kibr/State.hs:183:5: Not in scope: `asks'
src/Kibr/State.hs:190:5: Not in scope: `asks'

Especially until this bug in Syntastic is fixed, which with hdevtools has the really annoying effect that errors in State.hs are listed in the corresponding lines in CLI.hs, but regardless of that bug I think it's odd that the check command takes a file name and then shows output for other files.

@bitc
Copy link
Owner

bitc commented Feb 14, 2013

Yes, this is something that is slightly annoying and something that probably everyone runs into fairly regularly. I imagine that most people just manage the way I do, by

My idea for a solution is for hdevtools to scan the error output, and if it detects errors from files that are not the current source file, then replace them all with a single error for the line that does the "import" of the broken module, with an error message like "Cannot import module Kibr.State because it has errors". Perhaps a flag could be added to the check command that would preserve the current behavior.

@dag
Copy link
Author

dag commented Feb 15, 2013

I imagine that most people just manage the way I do, by

You got cut off here?

replace them all with a single error for the line that does the "import"

That'd be great!

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