All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Save g:ale_cs_csc_source
4 unlet! g:ale_cs_csc_source
6 call ale#test#SetDirectory('/testplugin/test/handler')
7 call ale#test#SetFilename('Test.cs')
9 runtime ale_linters/cs/csc.vim
14 call ale#test#RestoreDirectory()
15 call ale#linter#Reset()
17 Execute(The csc handler should work with the default of the buffer's directory):
23 \ 'text': '; expected',
26 \ 'filename': ale#path#Simplify(g:dir . '/Test.cs'),
29 \ ale_linters#cs#csc#Handle(bufnr(''), [
30 \ 'Test.cs(12,29): error CS1001: ; expected',
31 \ 'Compilation failed: 2 error(s), 1 warnings',
34 Execute(The csc handler should handle cannot find symbol errors):
35 let g:ale_cs_csc_source = '/home/foo/project/bar'
42 \ 'text': '; expected',
45 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
50 \ 'text': 'Unexpected processor directive (no #if for this #endif)',
53 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
58 \ 'text': 'some warning',
61 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
64 \ ale_linters#cs#csc#Handle(bufnr(''), [
65 \ 'Test.cs(12,29): error CS1001: ; expected',
66 \ 'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)',
67 \ 'Test.cs(10,12): warning CS0123: some warning',
68 \ 'Compilation failed: 2 error(s), 1 warnings',
71 Execute(The csc handler should handle non file specific compiler errors without reporting overal status report as error):
72 let g:ale_cs_csc_source = '/home/foo/project/bar'
79 \ 'text': 'No source files specified.',
82 \ 'filename': '<csc>',
87 \ 'text': 'Outputs without source must have the /out option specified',
90 \ 'filename': '<csc>',
93 \ ale_linters#cs#csc#Handle(bufnr(''), [
94 \ 'Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc)',
95 \ 'Copyright (C) Microsoft Corporation. All rights reserved.',
96 \ 'warning CS2008: No source files specified.',
97 \ 'error CS1562: Outputs without source must have the /out option specified',