diff options
author | Rob Berry <rob@luvhate.us> | 2017-02-14 22:47:53 +0000 |
---|---|---|
committer | Rob Berry <rob@luvhate.us> | 2017-02-16 10:06:48 +0000 |
commit | c4afd727926ec11d1f980847c48f0828784402d6 (patch) | |
tree | ac313cbb62fc77b973daabc5cf8f786953e2a34d /test | |
parent | c460602cbbf80c1b1b3f006ae3dd28528a80c17c (diff) | |
download | ale-c4afd727926ec11d1f980847c48f0828784402d6.zip |
Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter
https://github.com/hdevtools/hdevtools
The output for hdevtools is near identical to the ghc output so this
also extracts the ghc handler into the handle file and adds tests
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ghc_handler.vader | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_ghc_handler.vader b/test/test_ghc_handler.vader new file mode 100644 index 00000000..ef516314 --- /dev/null +++ b/test/test_ghc_handler.vader @@ -0,0 +1,30 @@ +Execute(The ghc handler should handle hdevtools output): + + AssertEqual + \ [ + \ {'lnum': 147, 'bufnr': 12, 'vcol': 0, 'nr': -1, 'type': 'W', 'col': 62, 'text': ':• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]'}, + \ ], + \ ale#handlers#HandleGhcFormat(12, [ + \ '/path/to/foo.hs:147:62: warning:', + \ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’', + \ ' Expected type: [T.Text]', + \ ]) + + +Execute(The ghc handler should handle ghc output): + + AssertEqual + \ [ + \ {'lnum': 6, 'bufnr': 47, 'vcol': 0, 'nr': -1, 'type': 'E', 'col': 1, 'text': ': Failed to load interface for ‘GitHub.Data’ Use -v to see a list of the files searched for.'}, + \ {'lnum': 7, 'bufnr': 47, 'vcol': 0, 'nr': -1, 'type': 'E', 'col': 1, 'text': ': Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.'}, + \ ], + \ ale#handlers#HandleGhcFormat(47, [ + \ '', + \ 'src/Appoint/Lib.hs:6:1: error:', + \ ' Failed to load interface for ‘GitHub.Data’', + \ ' Use -v to see a list of the files searched for.', + \ '', + \ 'src/Appoint/Lib.hs:7:1: error:', + \ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’', + \ ' Use -v to see a list of the files searched for.', + \ ]) |