summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-17 10:19:08 +0100
committerw0rp <devw0rp@gmail.com>2017-07-17 10:19:08 +0100
commiteab77b70722a87050ca12e0f93fe92e65c36361b (patch)
treeea20b8ccbdbca5c45112a41b2deecfadafd848b9 /ale_linters
parent3b1bc2bd138bc0109215d06b10be6909e808d5ec (diff)
downloadale-eab77b70722a87050ca12e0f93fe92e65c36361b.zip
#703 Add arguments to avoid generating plist files if no build directory is detected for clang-check
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/cpp/clangcheck.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/ale_linters/cpp/clangcheck.vim b/ale_linters/cpp/clangcheck.vim
index 936204d8..4b6169c8 100644
--- a/ale_linters/cpp/clangcheck.vim
+++ b/ale_linters/cpp/clangcheck.vim
@@ -19,10 +19,14 @@ function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort
let l:build_dir = ale#c#FindCompileCommands(a:buffer)
endif
+ " The extra arguments in the command are used to prevent .plist files from
+ " being generated. These are only added if no build directory can be
+ " detected.
return ale#Escape(ale_linters#cpp#clangcheck#GetExecutable(a:buffer))
\ . ' -analyze %s'
\ . (!empty(l:user_options) ? ' ' . l:user_options : '')
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
+ \ . (empty(l:build_dir) ? ' -extra-arg -Xanalyzer -extra-arg -analyzer-output=text' : '')
endfunction
call ale#linter#Define('cpp', {