From 9d7c48038cbbc696fe2d1e9c4b2d9eff2dd726c3 Mon Sep 17 00:00:00 2001 From: fenuks Date: Fri, 24 Aug 2018 10:52:33 +0100 Subject: Add clazy as cpp linter --- ale_linters/c/clangtidy.vim | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'ale_linters/c/clangtidy.vim') diff --git a/ale_linters/c/clangtidy.vim b/ale_linters/c/clangtidy.vim index 84c103e6..54137480 100644 --- a/ale_linters/c/clangtidy.vim +++ b/ale_linters/c/clangtidy.vim @@ -16,27 +16,9 @@ call ale#Set('c_clangtidy_checks', ['*']) call ale#Set('c_clangtidy_options', '') call ale#Set('c_build_dir', '') -function! s:GetBuildDirectory(buffer) abort - " Don't include build directory for header files, as compile_commands.json - " files don't consider headers to be translation units, and provide no - " commands for compiling header files. - if expand('#' . a:buffer) =~# '\v\.(h|hpp)$' - return '' - endif - - let l:build_dir = ale#Var(a:buffer, 'c_build_dir') - - " c_build_dir has the priority if defined - if !empty(l:build_dir) - return l:build_dir - endif - - return ale#path#Dirname(ale#c#FindCompileCommands(a:buffer)) -endfunction - function! ale_linters#c#clangtidy#GetCommand(buffer) abort let l:checks = join(ale#Var(a:buffer, 'c_clangtidy_checks'), ',') - let l:build_dir = s:GetBuildDirectory(a:buffer) + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) " Get the extra options if we couldn't find a build directory. let l:options = empty(l:build_dir) -- cgit v1.2.3