mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 23:06:51 +08:00
Support csc, update mcsc (#2586)
* Added a new csc linter for C# code. * More output is now handled for mcsc.
This commit is contained in:
47
test/command_callback/test_cs_csc_command_callbacks.vader
Normal file
47
test/command_callback/test_cs_csc_command_callbacks.vader
Normal file
@@ -0,0 +1,47 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('cs', 'csc')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The csc linter should return the correct default command):
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
Execute(The options should be be used in the command):
|
||||
let g:ale_cs_csc_options = ''
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
Execute(The souce path should be be used in the command):
|
||||
let g:ale_cs_csc_source = '../foo/bar'
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString('../foo/bar')
|
||||
\ . 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
Execute(The list of search pathes for assemblies should be be used in the command if not empty):
|
||||
let g:ale_cs_csc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe'
|
||||
\ . ' /lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar')
|
||||
\ . ' /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
let g:ale_cs_csc_assembly_path = []
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
Execute(The list of assemblies should be be used in the command if not empty):
|
||||
let g:ale_cs_csc_assemblies = ['foo.dll', 'bar.dll']
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe'
|
||||
\ . ' /r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll')
|
||||
\ . ' /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
|
||||
let g:ale_cs_csc_assemblies = []
|
||||
|
||||
AssertLinter 'csc', ale#path#CdString(g:dir)
|
||||
\ . 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||
Reference in New Issue
Block a user