mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
40
sources_non_forked/syntastic/syntax_checkers/c/cppclean.vim
Normal file
40
sources_non_forked/syntastic/syntax_checkers/c/cppclean.vim
Normal file
@ -0,0 +1,40 @@
|
||||
"============================================================================
|
||||
"File: cppclean.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_c_cppclean_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_c_cppclean_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_cppclean_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f:%l: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'c',
|
||||
\ 'name': 'cppclean' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,61 @@
|
||||
"============================================================================
|
||||
"File: flawfinder.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_c_flawfinder_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_c_flawfinder_checker = 1
|
||||
|
||||
if !exists('g:syntastic_c_flawfinder_sort')
|
||||
let g:syntastic_c_flawfinder_sort = 1
|
||||
endif
|
||||
|
||||
if !exists('g:syntastic_c_flawfinder_thres')
|
||||
let g:syntastic_c_flawfinder_thres = 3
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_flawfinder_GetHighlightRegex(item)
|
||||
let term = matchstr(a:item['text'], '\m^(\S\+)\s\+\zs\S\+\ze:')
|
||||
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_c_flawfinder_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': '--columns --dataonly --singleline --quiet' })
|
||||
|
||||
let errorformat = '%f:%l:%c: [%n] %m'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'returns': [0] })
|
||||
|
||||
for e in loclist
|
||||
let e['type'] = e['nr'] < g:syntastic_{self.getFiletype()}_flawfinder_thres ? 'W' : 'E'
|
||||
let e['nr'] = 0
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'c',
|
||||
\ 'name': 'flawfinder' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,40 @@
|
||||
"============================================================================
|
||||
"File: cmakelint.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_cmake_cmakelint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_cmake_cmakelint_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cmake_cmakelint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f:%l: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cmake',
|
||||
\ 'name': 'cmakelint' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,22 @@
|
||||
"============================================================================
|
||||
"File: cppclean.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: Benjamin Bannier <bbannier at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_cpp_cppclean_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_cpp_cppclean_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cpp',
|
||||
\ 'name': 'cppclean',
|
||||
\ 'redirect': 'c/cppclean'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,26 @@
|
||||
"============================================================================
|
||||
"File: flawfinder.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: Benjamin Bannier <bbannier at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_cpp_flawfinder_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_cpp_flawfinder_checker = 1
|
||||
|
||||
if !exists('g:syntastic_cpp_flawfinder_thres')
|
||||
let g:syntastic_cpp_flawfinder_thres = 3
|
||||
endif
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cpp',
|
||||
\ 'name': 'flawfinder',
|
||||
\ 'redirect': 'c/flawfinder'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -30,7 +30,10 @@ function! SyntaxCheckers_dart_dartanalyzer_GetHighlightRegex(error)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_dart_dartanalyzer_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--machine' })
|
||||
if !exists('s:format_machine')
|
||||
let s:format_machine = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 23]) ? '--format=machine' : '--machine'
|
||||
endif
|
||||
let makeprg = self.makeprgBuild({ 'args_after': s:format_machine })
|
||||
|
||||
" Machine readable format looks like:
|
||||
" SEVERITY|TYPE|ERROR_CODE|FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE
|
||||
|
51
sources_non_forked/syntastic/syntax_checkers/julia/lint.vim
Normal file
51
sources_non_forked/syntastic/syntax_checkers/julia/lint.vim
Normal file
@ -0,0 +1,51 @@
|
||||
"============================================================================
|
||||
"File: lint.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_julia_lint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_julia_lint_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_julia_lint_GetHighlightRegex(item)
|
||||
let term = matchstr(a:item['text'], '\m^\S\+\ze:')
|
||||
return term !=# '' ? '\V' . escape(term, '\') : ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_julia_lint_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ syntastic#util#system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('import Lint')) ==# '' &&
|
||||
\ v:shell_error == 0
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_julia_lint_GetLocList() dict
|
||||
let buf = bufnr('')
|
||||
|
||||
let makeprg = self.getExecEscaped() . ' -e ' . syntastic#util#shescape('using Lint; display(filter(err -> !isinfo(err), lintfile("' . escape(bufname(buf), '\"') . '")))')
|
||||
|
||||
let errorformat = '%f:%l %t%n %m'
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'julia',
|
||||
\ 'name': 'lint',
|
||||
\ 'exec': 'julia' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -1,6 +1,6 @@
|
||||
"============================================================================
|
||||
"File: php.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
@ -26,7 +26,7 @@ endfunction
|
||||
function! SyntaxCheckers_php_php_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-d error_reporting=E_ALL',
|
||||
\ 'args_after': '-l -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0' })
|
||||
\ 'args_after': '-l -d error_log= -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GNo syntax errors detected in%.%#,'.
|
||||
|
43
sources_non_forked/syntastic/syntax_checkers/po/dennis.vim
Normal file
43
sources_non_forked/syntastic/syntax_checkers/po/dennis.vim
Normal file
@ -0,0 +1,43 @@
|
||||
"============================================================================
|
||||
"File: dennis.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_po_dennis_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_po_dennis_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_po_dennis_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_after': 'lint',
|
||||
\ 'post_args_after': '--reporter line' })
|
||||
|
||||
let errorformat = '%f:%l:%c:%t%n:%m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'po',
|
||||
\ 'name': 'dennis',
|
||||
\ 'exec': 'dennis-cmd' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -0,0 +1,54 @@
|
||||
"============================================================================
|
||||
"File: bandit
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_python_bandit_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_python_bandit_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_bandit_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': '--format json',
|
||||
\ 'tail': '2> ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat = '%f:%l:%t:%n:%m'
|
||||
|
||||
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'env': env,
|
||||
\ 'preprocess': 'bandit',
|
||||
\ 'returns': [0, 1] })
|
||||
|
||||
for e in loclist
|
||||
if e['type'] ==? 'I'
|
||||
let e['type'] = 'W'
|
||||
let e['subtype'] = 'Style'
|
||||
endif
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'bandit' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -30,8 +30,10 @@ function! SyntaxCheckers_typescript_tslint_GetLocList() dict
|
||||
\ 'args_after': '--format verbose',
|
||||
\ 'fname_before': (s:tslint_new ? '' : '-f') })
|
||||
|
||||
" (comment-format) ts/app.ts[12, 36]: comment must start with lowercase letter
|
||||
let errorformat = '%f[%l\, %c]: %m'
|
||||
let errorformat =
|
||||
\ '%EERROR: %f[%l\, %c]: %m,' .
|
||||
\ '%WWARNING: %f[%l\, %c]: %m,' .
|
||||
\ '%E%f[%l\, %c]: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
@ -36,8 +36,14 @@ function! SyntaxCheckers_vim_vimlint_GetHighlightRegex(item) " {{{1
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_vim_vimlint_IsAvailable() dict " {{{1
|
||||
let vimlparser = globpath(&runtimepath, 'autoload/vimlparser.vim', 1)
|
||||
let vimlint = globpath(&runtimepath, 'autoload/vimlint.vim', 1)
|
||||
try
|
||||
" Vim 7.2-051 and later
|
||||
let vimlparser = globpath(&runtimepath, 'autoload/vimlparser.vim', 1)
|
||||
let vimlint = globpath(&runtimepath, 'autoload/vimlint.vim', 1)
|
||||
catch /\m^Vim\%((\a\+)\)\=:E118/
|
||||
let vimlparser = globpath(&runtimepath, 'autoload/vimlparser.vim')
|
||||
let vimlint = globpath(&runtimepath, 'autoload/vimlint.vim')
|
||||
endtry
|
||||
call self.log("globpath(&runtimepath, 'autoload/vimlparser.vim', 1) = " . string(vimlparser) . ', ' .
|
||||
\ "globpath(&runtimepath, 'autoload/vimlint.vim', 1) = " . string(vimlint))
|
||||
return vimlparser !=# '' && vimlint !=# ''
|
||||
|
Reference in New Issue
Block a user