2017-07-16 18:35:10 -04:00
|
|
|
Before:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#SetUpLinterTest('cpp', 'clangcheck')
|
2017-07-16 18:35:10 -04:00
|
|
|
|
|
|
|
After:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-07-16 18:35:10 -04:00
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'clang-check',
|
2017-07-17 05:19:08 -04:00
|
|
|
\ ale#Escape('clang-check')
|
2018-07-15 13:24:53 -04:00
|
|
|
\ . ' -analyze %s -extra-arg -Xclang -extra-arg -analyzer-output=text'
|
2017-07-16 18:35:10 -04:00
|
|
|
|
|
|
|
let b:ale_cpp_clangcheck_executable = 'foobar'
|
|
|
|
|
2017-07-17 05:19:08 -04:00
|
|
|
" The extra arguments in the command are used to prevent .plist files from
|
|
|
|
" being generated.
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'foobar',
|
2017-07-17 05:19:08 -04:00
|
|
|
\ ale#Escape('foobar')
|
2018-07-15 13:24:53 -04:00
|
|
|
\ . ' -analyze %s -extra-arg -Xclang -extra-arg -analyzer-output=text'
|
2017-07-16 18:35:10 -04:00
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let b:ale_cpp_clangcheck_options = '--something'
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'clang-check',
|
2017-07-17 05:19:08 -04:00
|
|
|
\ ale#Escape('clang-check')
|
2018-01-01 06:02:32 -05:00
|
|
|
\ . ' -analyze %s'
|
2018-01-08 08:28:01 -05:00
|
|
|
\ . ' -extra-arg -Xclang -extra-arg -analyzer-output=text'
|
2018-07-15 13:24:53 -04:00
|
|
|
\ . ' --something'
|
2017-07-16 18:35:10 -04:00
|
|
|
|
|
|
|
Execute(The build directory should be used when set):
|
|
|
|
let b:ale_cpp_clangcheck_options = '--something'
|
|
|
|
let b:ale_c_build_dir = '/foo/bar'
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'clang-check',
|
2017-07-16 18:35:10 -04:00
|
|
|
\ ale#Escape('clang-check')
|
2018-07-15 13:24:53 -04:00
|
|
|
\ . ' -analyze %s --something -p ' . ale#Escape('/foo/bar')
|