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.
7 call ale#assert#SetUpLinterTest('c', 'clangd')
9 function! Hook1(buffer)
18 call ale#assert#TearDownLinterTest()
20 Execute(The buffer-specific variable can be a string):
21 let b:ale_root = '/some/path'
22 call ale#test#SetFilename('other-file.c')
24 AssertLSPProject '/some/path'
26 Execute(The buffer-specific variable can be a dictionary):
27 let b:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
28 call ale#test#SetFilename('other-file.c')
30 AssertLSPProject '/some/path'
32 Execute(The buffer-specific variable can have funcrefs):
33 let b:ale_root = {'clangd': function('Hook1'), 'golangserver': '/path'}
34 call ale#test#SetFilename('other-file.c')
36 AssertLSPProject 'abc123'
38 Execute(The global variable can be a dictionary):
39 let g:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
40 call ale#test#SetFilename('other-file.c')
42 AssertLSPProject '/some/path'
44 Execute(The global variable can have funcrefs):
45 let g:ale_root = {'clangd': function('Hook1'), 'golangserver': '/path'}
46 call ale#test#SetFilename('other-file.c')
48 AssertLSPProject 'abc123'
50 Execute(The buffer-specific variable overrides the global variable):
51 let b:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
52 let g:ale_root = {'clangd': '/not/this/path', 'golangserver': '/elsewhere'}
53 call ale#test#SetFilename('other-file.c')
55 AssertLSPProject '/some/path'
57 Execute(The global variable is queried if the buffer-specific has no value):
58 let b:ale_root = {'golangserver': '/other/path'}
59 let g:ale_root = {'clangd': '/some/path', 'golangserver': '/elsewhere'}
60 call ale#test#SetFilename('other-file.c')
62 AssertLSPProject '/some/path'
64 Execute(No path should be returned by default):
65 call ale#test#SetFilename(tempname() . '/other-file.c')