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 call ale#assert#SetUpLinterTest('c', 'clangd')
4 Save b:ale_c_clangd_options
6 Save b:ale_c_build_dir_names
7 Save b:ale_c_parse_compile_commands
10 call ale#assert#TearDownLinterTest()
12 Execute(The language string should be correct):
15 Execute(The default executable should be correct):
16 AssertLinter 'clangd', ale#Escape('clangd')
18 Execute(The project root should be detected correctly):
19 call ale#test#SetFilename(tempname() . '/dummy.c')
23 call ale#test#SetFilename('../test-files/clangd/with_compile_commands/dummy.c')
25 AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/clangd/with_compile_commands')
27 Execute(The executable should be configurable):
28 let g:ale_c_clangd_executable = 'foobar'
30 AssertLinter 'foobar', ale#Escape('foobar')
32 Execute(The options should be configurable):
33 let b:ale_c_clangd_options = '-compile-commands-dir=foo'
35 AssertLinter 'clangd', ale#Escape('clangd') . ' ' . b:ale_c_clangd_options
37 Execute(The compile command database should be detected correctly):
38 call ale#test#SetFilename('../test-files/clangd/with_build_dir/dummy_src/dummy.c')
40 let b:ale_c_clangd_options = ''
41 let b:ale_c_build_dir = ''
42 let b:ale_c_build_dir_names = ['unusual_build_dir_name']
43 let b:ale_c_parse_compile_commands = 1
45 AssertLinter 'clangd', ale#Escape('clangd')
46 \ . ' -compile-commands-dir='
47 \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/clangd/with_build_dir/unusual_build_dir_name'))