2017-09-26 07:19:53 +00:00
|
|
|
Before:
|
|
|
|
Save g:ale_cs_mcsc_source
|
|
|
|
|
|
|
|
unlet! g:ale_cs_mcsc_source
|
|
|
|
|
|
|
|
runtime ale_linters/cs/mcsc.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! g:ale_cs_mcsc_source
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The mcs handler should handle cannot find symbol errors):
|
|
|
|
let g:ale_cs_mcsc_source='/home/foo/project/bar'
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 12,
|
|
|
|
\ 'col' : 29,
|
|
|
|
\ 'text': 'error CS1001: ; expected',
|
|
|
|
\ 'type': 'E',
|
2017-10-01 16:36:47 +00:00
|
|
|
\ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
|
2017-09-26 07:19:53 +00:00
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 101,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'text': 'error CS1028: Unexpected processor directive (no #if for this #endif)',
|
|
|
|
\ 'type': 'E',
|
2017-10-01 16:36:47 +00:00
|
|
|
\ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
|
2017-09-26 07:19:53 +00:00
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 12,
|
|
|
|
\ 'text': 'warning CS0123: some warning',
|
|
|
|
\ 'type': 'W',
|
2017-10-01 16:36:47 +00:00
|
|
|
\ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
|
2017-09-26 07:19:53 +00:00
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#cs#mcsc#Handle(347, [
|
|
|
|
\ 'Test.cs(12,29): error CS1001: ; expected',
|
|
|
|
\ 'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)',
|
|
|
|
\ 'Test.cs(10,12): warning CS0123: some warning',
|
|
|
|
\ 'Compilation failed: 2 error(s), 1 warnings',
|
|
|
|
\ ])
|