From e573b3020c032400eed60b649a2cbf55266e6bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:03:25 +0200 Subject: Add current configurations from old repository --- vim/bundle/syntastic/syntax_checkers/c/avrgcc.vim | 57 +++++++++++++++++++ .../syntastic/syntax_checkers/c/checkpatch.vim | 60 ++++++++++++++++++++ .../syntastic/syntax_checkers/c/clang_check.vim | 64 +++++++++++++++++++++ .../syntastic/syntax_checkers/c/clang_tidy.vim | 64 +++++++++++++++++++++ .../syntastic/syntax_checkers/c/cppcheck.vim | 62 ++++++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/gcc.vim | 59 +++++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/make.vim | 61 ++++++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/oclint.vim | 65 +++++++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/pc_lint.vim | 66 ++++++++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/sparse.vim | 48 ++++++++++++++++ vim/bundle/syntastic/syntax_checkers/c/splint.vim | 55 ++++++++++++++++++ 11 files changed, 661 insertions(+) create mode 100644 vim/bundle/syntastic/syntax_checkers/c/avrgcc.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/checkpatch.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/clang_check.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/clang_tidy.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/cppcheck.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/gcc.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/make.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/oclint.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/pc_lint.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/sparse.vim create mode 100644 vim/bundle/syntastic/syntax_checkers/c/splint.vim (limited to 'vim/bundle/syntastic/syntax_checkers/c') diff --git a/vim/bundle/syntastic/syntax_checkers/c/avrgcc.vim b/vim/bundle/syntastic/syntax_checkers/c/avrgcc.vim new file mode 100644 index 0000000..0fbb984 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/avrgcc.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: avrgcc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karel +"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_avrgcc_checker') + finish +endif +let g:loaded_syntastic_c_avrgcc_checker = 1 + +if !exists('g:syntastic_avrgcc_config_file') + let g:syntastic_avrgcc_config_file = '.syntastic_avrgcc_config' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_avrgcc_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args_before': syntastic#c#ReadConfig(g:syntastic_avrgcc_config_file), + \ 'args_after': '-x c -fsyntax-only' }) + + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,' . + \ '%-G %#from %f:%l\,,' . + \ '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c: %m,' . + \ '%f:%l: %trror: %m,' . + \ '%f:%l: %tarning: %m,'. + \ '%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['compressWhitespace'] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'avrgcc', + \ 'exec': 'avr-gcc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/checkpatch.vim b/vim/bundle/syntastic/syntax_checkers/c/checkpatch.vim new file mode 100644 index 0000000..43b047c --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/checkpatch.vim @@ -0,0 +1,60 @@ +"============================================================================ +"File: checkpatch.vim +"Description: Syntax checking plugin for syntastic.vim using checkpatch.pl +"Maintainer: Daniel Walker +"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_checkpatch_checker') + finish +endif +let g:loaded_syntastic_c_checkpatch_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_checkpatch_IsAvailable() dict + call syntastic#log#deprecationWarn('c_checker_checkpatch_location', 'c_checkpatch_exec') + + if !exists('g:syntastic_c_checkpatch_exec') && !executable(self.getExec()) + if executable('checkpatch') + let g:syntastic_c_checkpatch_exec = 'checkpatch' + elseif executable('./scripts/checkpatch.pl') + let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch.pl', ':p') + elseif executable('./scripts/checkpatch') + let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch', ':p') + endif + endif + + call self.log('exec =', self.getExec()) + + return executable(self.getExec()) +endfunction + +function! SyntaxCheckers_c_checkpatch_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '--no-summary --no-tree --terse --file' }) + + let errorformat = + \ '%f:%l: %tARNING: %m,' . + \ '%f:%l: %tRROR: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1], + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'checkpatch', + \ 'exec': 'checkpatch.pl'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/clang_check.vim b/vim/bundle/syntastic/syntax_checkers/c/clang_check.vim new file mode 100644 index 0000000..4c3677a --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/clang_check.vim @@ -0,0 +1,64 @@ +"============================================================================ +"File: clang_check.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Benjamin Bannier +"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_clang_check_checker') + finish +endif +let g:loaded_syntastic_c_clang_check_checker = 1 + +if !exists('g:syntastic_clang_check_config_file') + let g:syntastic_clang_check_config_file = '.syntastic_clang_check_config' +endif + +if !exists('g:syntastic_c_clang_check_sort') + let g:syntastic_c_clang_check_sort = 1 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_clang_check_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'post_args': + \ '-- ' . + \ syntastic#c#ReadConfig(g:syntastic_clang_check_config_file) . ' ' . + \ '-fshow-column ' . + \ '-fshow-source-location ' . + \ '-fno-caret-diagnostics ' . + \ '-fno-color-diagnostics ' . + \ '-fdiagnostics-format=clang' }) + + let errorformat = + \ '%E%f:%l:%c: fatal error: %m,' . + \ '%E%f:%l:%c: error: %m,' . + \ '%W%f:%l:%c: warning: %m,' . + \ '%-G%\m%\%%(LLVM ERROR:%\|No compilation database found%\)%\@!%.%#,' . + \ '%E%m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'defaults': {'bufnr': bufnr('')}, + \ 'returns': [0, 1] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'clang_check', + \ 'exec': 'clang-check'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/clang_tidy.vim b/vim/bundle/syntastic/syntax_checkers/c/clang_tidy.vim new file mode 100644 index 0000000..6d8cbfe --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/clang_tidy.vim @@ -0,0 +1,64 @@ +"============================================================================ +"File: clang_tidy.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Benjamin Bannier +"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_clang_tidy_checker') + finish +endif +let g:loaded_syntastic_c_clang_tidy_checker = 1 + +if !exists('g:syntastic_clang_tidy_config_file') + let g:syntastic_clang_tidy_config_file = '.syntastic_clang_tidy_config' +endif + +if !exists('g:syntastic_c_clang_tidy_sort') + let g:syntastic_c_clang_tidy_sort = 1 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_clang_tidy_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'post_args': + \ '-- ' . + \ syntastic#c#ReadConfig(g:syntastic_clang_tidy_config_file) . ' ' . + \ '-fshow-column ' . + \ '-fshow-source-location ' . + \ '-fno-caret-diagnostics ' . + \ '-fno-color-diagnostics ' . + \ '-fdiagnostics-format=clang' }) + + let errorformat = + \ '%E%f:%l:%c: fatal error: %m,' . + \ '%E%f:%l:%c: error: %m,' . + \ '%W%f:%l:%c: warning: %m,' . + \ '%-G%\m%\%%(LLVM ERROR:%\|No compilation database found%\)%\@!%.%#,' . + \ '%E%m' + + let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'env': env, + \ 'defaults': {'bufnr': bufnr('')}, + \ 'returns': [0, 1] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'clang_tidy', + \ 'exec': 'clang-tidy'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/cppcheck.vim b/vim/bundle/syntastic/syntax_checkers/c/cppcheck.vim new file mode 100644 index 0000000..cd802a8 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/cppcheck.vim @@ -0,0 +1,62 @@ +"============================================================================ +"File: cppcheck.vim +"Description: Syntax checking plugin for syntastic.vim using cppcheck.pl +"Maintainer: LCD 47 +"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_cppcheck_checker') + finish +endif +let g:loaded_syntastic_c_cppcheck_checker = 1 + +if !exists('g:syntastic_cppcheck_config_file') + let g:syntastic_cppcheck_config_file = '.syntastic_cppcheck_config' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_cppcheck_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file), + \ 'args_after': '-q --enable=style' }) + + let errorformat = + \ '[%f:%l]: (%trror) %m,' . + \ '[%f:%l]: (%tarning) %m,' . + \ '[%f:%l]: (%ttyle) %m,' . + \ '[%f:%l]: (%terformance) %m,' . + \ '[%f:%l]: (%tortability) %m,' . + \ '[%f:%l]: (%tnformation) %m,' . + \ '[%f:%l]: (%tnconclusive) %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'preprocess': 'cppcheck', + \ 'returns': [0] }) + + for e in loclist + if e['type'] =~? '\m^[SPI]' + let e['type'] = 'w' + let e['subtype'] = 'Style' + endif + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'cppcheck'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/gcc.vim b/vim/bundle/syntastic/syntax_checkers/c/gcc.vim new file mode 100644 index 0000000..4fa9216 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/gcc.vim @@ -0,0 +1,59 @@ +"============================================================================ +"File: c.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_gcc_checker') + finish +endif +let g:loaded_syntastic_c_gcc_checker = 1 + +if !exists('g:syntastic_c_compiler_options') + let g:syntastic_c_compiler_options = '-std=gnu99' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_gcc_IsAvailable() dict + if !exists('g:syntastic_c_compiler') + let g:syntastic_c_compiler = executable(self.getExec()) ? self.getExec() : 'clang' + endif + call self.log('g:syntastic_c_compiler =', g:syntastic_c_compiler) + return executable(expand(g:syntastic_c_compiler, 1)) +endfunction + +function! SyntaxCheckers_c_gcc_GetLocList() dict + return syntastic#c#GetLocList('c', 'gcc', { + \ 'errorformat': + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,' . + \ '%-G %#from %f:%l\,,' . + \ '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c: %m,' . + \ '%f:%l: %trror: %m,' . + \ '%f:%l: %tarning: %m,'. + \ '%f:%l: %m', + \ 'main_flags': '-x c -fsyntax-only', + \ 'header_flags': '-x c', + \ 'header_names': '\m\.h$' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'gcc' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/make.vim b/vim/bundle/syntastic/syntax_checkers/c/make.vim new file mode 100644 index 0000000..e477994 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/make.vim @@ -0,0 +1,61 @@ +"============================================================================ +"File: make.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"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_make_checker') + finish +endif +let g:loaded_syntastic_c_make_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_make_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args': '-sk', 'fname': '' }) + + let errorformat = + \ '%-G%f:%s:,' . + \ '%-G%f:%l: %#error: %#(Each undeclared identifier is reported only%.%#,' . + \ '%-G%f:%l: %#error: %#for each function it appears%.%#,' . + \ '%-GIn file included%.%#,' . + \ '%-G %#from %f:%l\,,' . + \ '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c: %m,' . + \ '%f:%l: %trror: %m,' . + \ '%f:%l: %tarning: %m,'. + \ '%f:%l: %m' + + if exists('g:syntastic_c_errorformat') + let errorformat = g:syntastic_c_errorformat + endif + + " process makeprg + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_c_remove_include_errors') && g:syntastic_c_remove_include_errors != 0 + return filter(errors, 'has_key(v:val, "bufnr") && v:val["bufnr"] == ' . bufnr('')) + else + return errors + endif +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'make'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/oclint.vim b/vim/bundle/syntastic/syntax_checkers/c/oclint.vim new file mode 100644 index 0000000..f172a11 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/oclint.vim @@ -0,0 +1,65 @@ +"============================================================================ +"File: oclint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: "UnCO" Lin +"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_oclint_checker') + finish +endif +let g:loaded_syntastic_c_oclint_checker = 1 + +if !exists('g:syntastic_oclint_config_file') + let g:syntastic_oclint_config_file = '.syntastic_oclint_config' +endif + +if !exists('g:syntastic_c_oclint_sort') + let g:syntastic_c_oclint_sort = 1 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_oclint_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file) }) + + let errorformat = + \ '%E%f:%l:%c: fatal error: %m,' . + \ '%E%f:%l:%c: error: %m,' . + \ '%W%f:%l:%c: warning: %m,' . + \ '%E%f:%l:%c: %m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['compressWhitespace'], + \ 'returns': [0, 3, 5] }) + + for e in loclist + if e['text'] =~# '\v P3( |$)' + let e['type'] = 'W' + endif + + let e['text'] = substitute(e['text'], '\m\C P[1-3]$', '', '') + let e['text'] = substitute(e['text'], '\m\C P[1-3] ', ': ', '') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'oclint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/pc_lint.vim b/vim/bundle/syntastic/syntax_checkers/c/pc_lint.vim new file mode 100644 index 0000000..6efd17a --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/pc_lint.vim @@ -0,0 +1,66 @@ +"============================================================================ +"File: pc_lint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Steve Bragg +"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_pc_lint_checker') + finish +endif +let g:loaded_syntastic_c_pc_lint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +if !exists('g:syntastic_pc_lint_config_file') + let g:syntastic_pc_lint_config_file = 'options.lnt' +endif + +function! SyntaxCheckers_c_pc_lint_GetLocList() dict + let config = syntastic#util#findFileInParent(g:syntastic_pc_lint_config_file, expand('%:p:h', 1)) + call self.log('config =', config) + + " -hFs1 - show filename, add space after messages, try to make message 1 line + " -width(0,0) - make sure there are no line breaks + " -t - set tab size + " -v - turn off verbosity + let makeprg = self.makeprgBuild({ + \ 'args': (filereadable(config) ? syntastic#util#shescape(fnamemodify(config, ':p')) : ''), + \ 'args_after': ['-hFs1', '-width(0,0)', '-t' . &tabstop, '-format=%f:%l:%C:%t:%n:%m'] }) + + let errorformat = + \ '%E%f:%l:%v:Error:%n:%m,' . + \ '%W%f:%l:%v:Warning:%n:%m,' . + \ '%I%f:%l:%v:Info:%n:%m,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'postprocess': ['cygwinRemoveCR'] }) + + 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': 'c', + \ 'name': 'pc_lint', + \ 'exec': 'lint-nt'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/sparse.vim b/vim/bundle/syntastic/syntax_checkers/c/sparse.vim new file mode 100644 index 0000000..ca831c0 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/sparse.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: sparse.vim +"Description: Syntax checking plugin for syntastic.vim using sparse.pl +"Maintainer: Daniel Walker +"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_sparse_checker') + finish +endif +let g:loaded_syntastic_c_sparse_checker = 1 + +if !exists('g:syntastic_sparse_config_file') + let g:syntastic_sparse_config_file = '.syntastic_sparse_config' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_sparse_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': syntastic#c#ReadConfig(g:syntastic_sparse_config_file), + \ 'args_after': '-ftabstop=' . &ts }) + + let errorformat = + \ '%f:%l:%v: %trror: %m,' . + \ '%f:%l:%v: %tarning: %m,' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr('')}, + \ 'returns': [0, 1] }) + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'sparse'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/vim/bundle/syntastic/syntax_checkers/c/splint.vim b/vim/bundle/syntastic/syntax_checkers/c/splint.vim new file mode 100644 index 0000000..a4e19f0 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c/splint.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: splint.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: LCD 47 +"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_splint_checker') + finish +endif +let g:loaded_syntastic_c_splint_checker = 1 + +if !exists('g:syntastic_splint_config_file') + let g:syntastic_splint_config_file = '.syntastic_splint_config' +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_c_splint_GetLocList() dict + let makeprg = self.makeprgBuild({ + \ 'args': syntastic#c#ReadConfig(g:syntastic_splint_config_file), + \ 'args_after': '-showfunc -hints +quiet' }) + + let errorformat = + \ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' . + \ '%-G%f(%l\,%v): %[%#]%[%#]%[%#] Internal Bug %.%#,' . + \ '%W%f:%l:%v: %m,' . + \ '%W%f(%l\,%v): %m,' . + \ '%W%f:%l: %m,' . + \ '%W%f(%l): %m,' . + \ '%-C %\+In file included from %.%#,' . + \ '%-C %\+from %.%#,' . + \ '%+C %.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'postprocess': ['compressWhitespace'], + \ 'defaults': {'type': 'W'} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'splint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: -- cgit v1.2.3