summaryrefslogtreecommitdiff
path: root/ale_linters/c/flawfinder.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/c/flawfinder.vim')
-rw-r--r--ale_linters/c/flawfinder.vim12
1 files changed, 3 insertions, 9 deletions
diff --git a/ale_linters/c/flawfinder.vim b/ale_linters/c/flawfinder.vim
index df6fbebe..7e1f6769 100644
--- a/ale_linters/c/flawfinder.vim
+++ b/ale_linters/c/flawfinder.vim
@@ -6,18 +6,12 @@ call ale#Set('c_flawfinder_options', '')
call ale#Set('c_flawfinder_minlevel', 1)
call ale#Set('c_flawfinder_error_severity', 6)
-function! ale_linters#c#flawfinder#GetExecutable(buffer) abort
- return ale#Var(a:buffer, 'c_flawfinder_executable')
-endfunction
-
function! ale_linters#c#flawfinder#GetCommand(buffer) abort
-
" Set the minimum vulnerability level for flawfinder to bother with
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
- return ale#Escape(ale_linters#c#flawfinder#GetExecutable(a:buffer))
- \ . ' -CDQS'
- \ . ale#Var(a:buffer, 'c_flawfinder_options')
+ return '%e -CDQS'
+ \ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options'))
\ . l:minlevel
\ . ' %t'
endfunction
@@ -25,7 +19,7 @@ endfunction
call ale#linter#Define('c', {
\ 'name': 'flawfinder',
\ 'output_stream': 'stdout',
-\ 'executable_callback': 'ale_linters#c#flawfinder#GetExecutable',
+\ 'executable_callback': ale#VarFunc('c_flawfinder_executable'),
\ 'command_callback': 'ale_linters#c#flawfinder#GetCommand',
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
\})