diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-26 18:24:10 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-26 18:24:10 +0000 |
commit | ae7cd2c0907573c9c4996296b642e547fd1ee04f (patch) | |
tree | 4bebc720de3fa238dc47e4f9e1b43d84cddbac15 /test/handler/test_ghc_handler.vader | |
parent | 8254e507d67bde88081602dbf4ff9bca03ab23cd (diff) | |
download | ale-ae7cd2c0907573c9c4996296b642e547fd1ee04f.zip |
Fix #918 - Save prettier details for Haskell linters
Diffstat (limited to 'test/handler/test_ghc_handler.vader')
-rw-r--r-- | test/handler/test_ghc_handler.vader | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/test/handler/test_ghc_handler.vader b/test/handler/test_ghc_handler.vader index b47cdf67..2a26f863 100644 --- a/test/handler/test_ghc_handler.vader +++ b/test/handler/test_ghc_handler.vader @@ -8,6 +8,10 @@ Execute(The ghc handler should handle hdevtools output): \ 'type': 'W', \ 'col': 62, \ 'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]', + \ 'detail': join([ + \ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’', + \ ' Expected type: [T.Text]', + \ ], "\n"), \ }, \ ], \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ @@ -26,12 +30,20 @@ Execute(The ghc handler should handle ghc 8 output): \ 'type': 'E', \ 'col': 1, \ 'text': 'Failed to load interface for ‘GitHub.Data’ Use -v to see a list of the files searched for.', + \ 'detail': join([ + \ ' Failed to load interface for ‘GitHub.Data’', + \ ' Use -v to see a list of the files searched for.', + \ ], "\n"), \ }, \ { \ 'lnum': 7, \ 'type': 'W', \ 'col': 1, \ 'text': 'Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.', + \ 'detail': join([ + \ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’', + \ ' Use -v to see a list of the files searched for.', + \ ], "\n"), \ }, \ ], \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ @@ -55,24 +67,36 @@ Execute(The ghc handler should handle ghc 7 output): \ 'type': 'E', \ 'col': 1, \ 'text': 'parse error (possibly incorrect indentation or mismatched brackets)', + \ 'detail': join([ + \ ' parse error (possibly incorrect indentation or mismatched brackets)', + \ ], "\n"), \ }, \ { \ 'lnum': 84, \ 'col': 1, \ 'type': 'W', - \ 'text': 'Top-level binding with no type signature:^@ myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ 'text': 'Top-level binding with no type signature: myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ 'detail': join([ + \ ' Top-level binding with no type signature:', + \ ' myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ ], "\n"), \ }, \ { \ 'lnum': 94, \ 'col': 5, \ 'type': 'E', \ 'text': 'Some other error', + \ 'detail': join([ + \ ' Some other error', + \ ], "\n"), \ }, \ ], \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ \ ale#path#Winify('src/Main.hs') . ':168:1:', \ ' parse error (possibly incorrect indentation or mismatched brackets)', - \ ale#path#Winify('src/Main.hs') . ':84:1:Warning: Top-level binding with no type signature:^@ myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ ale#path#Winify('src/Main.hs') . ':84:1:Warning:', + \ ' Top-level binding with no type signature:', + \ ' myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', \ ale#path#Winify('src/Main.hs') . ':94:5:Error:', \ ' Some other error', \ ]) @@ -87,6 +111,14 @@ Execute(The ghc handler should handle stack 1.5.1 output): \ 'col': 14, \ 'type': 'E', \ 'text': '• Expecting one fewer arguments to ‘Exp’ Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’ • In the type ‘Exp a’ | 160 | pattern F :: Exp a | ^^^^^', + \ 'detail': join([ + \ ' • Expecting one fewer arguments to ‘Exp’', + \ ' Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’', + \ ' • In the type ‘Exp a’', + \ ' |', + \ ' 160 | pattern F :: Exp a', + \ ' | ^^^^^', + \ ], "\n"), \ }, \ ], \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ |