]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/ale_linters/c/flawfinder.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / ale_linters / c / flawfinder.vim
1 " Author: Christian Gibbons <cgibbons@gmu.edu>
2 " Description: flawfinder linter for c files
3
4 call ale#Set('c_flawfinder_executable', 'flawfinder')
5 call ale#Set('c_flawfinder_options', '')
6 call ale#Set('c_flawfinder_minlevel', 1)
7 call ale#Set('c_flawfinder_error_severity', 6)
8
9 function! ale_linters#c#flawfinder#GetCommand(buffer) abort
10     " Set the minimum vulnerability level for flawfinder to bother with
11     let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
12
13     return '%e -CDQS'
14     \  . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options'))
15     \  . l:minlevel
16     \  . ' %t'
17 endfunction
18
19 call ale#linter#Define('c', {
20 \  'name': 'flawfinder',
21 \  'output_stream': 'stdout',
22 \  'executable': {b -> ale#Var(b, 'c_flawfinder_executable')},
23 \  'command': function('ale_linters#c#flawfinder#GetCommand'),
24 \  'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
25 \})