Fix #690 - Filter out errors from other files for Haskell
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Execute(The ghc handler should handle hdevtools output):
|
||||
call ale#test#SetFilename('foo.hs')
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
@@ -8,13 +10,15 @@ Execute(The ghc handler should handle hdevtools output):
|
||||
\ 'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#haskell#HandleGHCFormat(12, [
|
||||
\ '/path/to/foo.hs:147:62: warning:',
|
||||
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
||||
\ '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 8 output):
|
||||
call ale#test#SetFilename('src/Appoint/Lib.hs')
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
@@ -30,7 +34,7 @@ Execute(The ghc handler should handle ghc 8 output):
|
||||
\ 'text': ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#haskell#HandleGHCFormat(47, [
|
||||
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
||||
\ '',
|
||||
\ 'src/Appoint/Lib.hs:6:1: error:',
|
||||
\ ' Failed to load interface for ‘GitHub.Data’',
|
||||
@@ -42,6 +46,8 @@ Execute(The ghc handler should handle ghc 8 output):
|
||||
\ ])
|
||||
|
||||
Execute(The ghc handler should handle ghc 7 output):
|
||||
call ale#test#SetFilename('src/Main.hs')
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
@@ -51,7 +57,7 @@ Execute(The ghc handler should handle ghc 7 output):
|
||||
\ 'text': ' parse error (possibly incorrect indentation or mismatched brackets)',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#haskell#HandleGHCFormat(47, [
|
||||
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
||||
\ 'src/Main.hs:168:1:',
|
||||
\ ' parse error (possibly incorrect indentation or mismatched brackets)',
|
||||
\ ])
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Execute(HandleGhcFormat should handle ghc-mod problems):
|
||||
call ale#test#SetFilename('check2.hs')
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
@@ -21,7 +23,8 @@ Execute(HandleGhcFormat should handle ghc-mod problems):
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
||||
\ 'check1.hs:2:1:Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
|
||||
\ 'check2.hs:2:1:Failed to load interface for ‘Missing’Use -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',
|
||||
\ ])
|
||||
|
||||
@@ -41,3 +41,4 @@ Execute(ale#path#IsBufferPath should match files in /tmp):
|
||||
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '../../../../../../../../tmp/vG0hKyD/1/test.ts')
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '/tmp/vG0hKyD/1/test.ts')
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '/run/user/1000/vG0hKyD/1/test.ts')
|
||||
|
||||
Reference in New Issue
Block a user