hdevtools icon indicating copy to clipboard operation
hdevtools copied to clipboard

Filter out errors and warnings for other files

Open dag opened this issue 12 years ago • 2 comments

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.

dag avatar Feb 13 '13 03:02 dag

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.

bitc avatar Feb 14 '13 19:02 bitc

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!

dag avatar Feb 15 '13 05:02 dag