bsermons / flycheck-elm

Flycheck support for the elm language
GNU General Public License v3.0
18 stars 8 forks source link

Should have a way to see the full error message #7

Open tko opened 8 years ago

tko commented 8 years ago

Given this (obviously) broken code

test : String
test = 42

the error message seen in flycheck is pretty much lacking in details

The type annotation for `test` does not match its definition.

Sure, in the trivial case such above that's often good enough, but when the types are more complex and the type mismatch much less obvious it would be very useful to be able to see the rest of the error message somehow

The type annotation for `test` does not match its definition.

1| test : String
          ^^^^^^
The type annotation is saying:

    String

But I am inferring that the definition has this type:

    number

I've learned about flycheck-compile but with the json output it's not at all readable. Seems the only way to see the full error message is to jump to shell and run elm-make manually :-/

bsermons commented 8 years ago

Thanks for the suggestion. I just pushed an update to add more details for error messages. Let me know if that works for you.

tko commented 8 years ago

Looks great. I hadn't realized just how verbose elm errors/warnings really are...

I wonder if the "[TYPE MISMATCH]" tag should be flagged as the :id for flychecker instead, that extra line it consumes in the message is relatively noisy as its rather generic and rather redundant as it's fairly explained in the message itself.