ale/test/handler/test_ghc_mod_handler.vader

31 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Execute(HandleGhcFormat should handle ghc-mod problems):
call ale#test#SetFilename('check2.hs')
AssertEqual
\ [
\ {
\ 'lnum': 2,
\ 'col': 1,
\ 'type': 'E',
\ 'text': 'Failed to load interface for MissingUse -v to see a list of the files searched for.',
\ },
\ {
\ 'lnum': 2,
\ 'col': 1,
\ 'type': 'E',
\ 'text': ' Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...',
\ },
\ {
\ 'lnum': 6,
\ 'col': 1,
\ 'type': 'E',
\ 'text': ' Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ',
\ },
\ ],
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
\ 'check2.hs:2:1:Failed to load interface for MissingUse -v to see a list of the files searched for.',
\ 'check2.hs:2:1: Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...',
\ 'check2.hs:6:1: Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ',
\ 'xxx.hs:6:1: Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ',
\ ])