aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/syntastic/syntax_checkers/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vim/bundle/syntastic/syntax_checkers/cpp')
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/clang_check.vim22
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/clang_tidy.vim22
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/cppcheck.vim22
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/cpplint.vim52
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/gcc.vim56
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/oclint.vim22
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/pc_lint.vim23
-rw-r--r--vim/bundle/syntastic/syntax_checkers/cpp/verapp.vim48
8 files changed, 267 insertions, 0 deletions
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/clang_check.vim b/vim/bundle/syntastic/syntax_checkers/cpp/clang_check.vim
new file mode 100644
index 0000000..cf9ec0c
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/clang_check.vim
@@ -0,0 +1,22 @@
+"============================================================================
+"File: clang_check.vim
+"Description: Syntax checking plugin for syntastic.vim
+"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_clang_check_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_clang_check_checker = 1
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'clang_check',
+ \ 'redirect': 'c/clang_check'})
+
+" vim: set sw=4 sts=4 et fdm=marker:
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/clang_tidy.vim b/vim/bundle/syntastic/syntax_checkers/cpp/clang_tidy.vim
new file mode 100644
index 0000000..770d1f6
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/clang_tidy.vim
@@ -0,0 +1,22 @@
+"============================================================================
+"File: clang_tidy.vim
+"Description: Syntax checking plugin for syntastic.vim
+"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_clang_tidy_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_clang_tidy_checker = 1
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'clang_tidy',
+ \ 'redirect': 'c/clang_tidy'})
+
+" vim: set sw=4 sts=4 et fdm=marker:
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/cppcheck.vim b/vim/bundle/syntastic/syntax_checkers/cpp/cppcheck.vim
new file mode 100644
index 0000000..4e0eb86
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/cppcheck.vim
@@ -0,0 +1,22 @@
+"============================================================================
+"File: cppcheck.vim
+"Description: Syntax checking plugin for syntastic.vim using cppcheck.pl
+"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_cpp_cppcheck_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_cppcheck_checker = 1
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'cppcheck',
+ \ 'redirect': 'c/cppcheck'})
+
+" vim: set sw=4 sts=4 et fdm=marker:
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/cpplint.vim b/vim/bundle/syntastic/syntax_checkers/cpp/cpplint.vim
new file mode 100644
index 0000000..54984bb
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/cpplint.vim
@@ -0,0 +1,52 @@
+"============================================================================
+"File: cpplint.vim
+"Description: Syntax checking plugin for syntastic.vim
+"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_cpp_cpplint_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_cpplint_checker = 1
+
+if !exists('g:syntastic_cpp_cpplint_thres')
+ let g:syntastic_cpp_cpplint_thres = 5
+endif
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+function! SyntaxCheckers_cpp_cpplint_GetLocList() dict
+ let makeprg = self.makeprgBuild({ 'args': '--verbose=3' })
+
+ let errorformat = '%A%f:%l: %m [%t],%-G%.%#'
+
+ let loclist = SyntasticMake({
+ \ 'makeprg': makeprg,
+ \ 'errorformat': errorformat,
+ \ 'subtype': 'Style',
+ \ 'returns': [0, 1] })
+
+ " change error types according to the prescribed threshold
+ for e in loclist
+ let e['type'] = e['type'] < g:syntastic_cpp_cpplint_thres ? 'W' : 'E'
+ endfor
+
+ return loclist
+endfunction
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'cpplint',
+ \ 'exec': 'cpplint.py'})
+
+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/cpp/gcc.vim b/vim/bundle/syntastic/syntax_checkers/cpp/gcc.vim
new file mode 100644
index 0000000..1243980
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/gcc.vim
@@ -0,0 +1,56 @@
+"============================================================================
+"File: cpp.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: Gregor Uhlenheuer <kongo2002 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_gcc_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_gcc_checker = 1
+
+if !exists('g:syntastic_cpp_compiler_options')
+ let g:syntastic_cpp_compiler_options = ''
+endif
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+function! SyntaxCheckers_cpp_gcc_IsAvailable() dict
+ if !exists('g:syntastic_cpp_compiler')
+ let g:syntastic_cpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang++'
+ endif
+ call self.log('g:syntastic_cpp_compiler =', g:syntastic_cpp_compiler)
+ return executable(expand(g:syntastic_cpp_compiler, 1))
+endfunction
+
+function! SyntaxCheckers_cpp_gcc_GetLocList() dict
+ return syntastic#c#GetLocList('cpp', 'gcc', {
+ \ 'errorformat':
+ \ '%-G%f:%s:,' .
+ \ '%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\|hpp\|hh\)$' })
+endfunction
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'gcc',
+ \ 'exec': 'g++' })
+
+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/cpp/oclint.vim b/vim/bundle/syntastic/syntax_checkers/cpp/oclint.vim
new file mode 100644
index 0000000..8217769
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/oclint.vim
@@ -0,0 +1,22 @@
+"============================================================================
+"File: oclint.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: "UnCO" Lin <undercooled aT lavabit 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_oclint_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_oclint_checker = 1
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'oclint',
+ \ 'redirect': 'c/oclint'})
+
+" vim: set sw=4 sts=4 et fdm=marker:
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/pc_lint.vim b/vim/bundle/syntastic/syntax_checkers/cpp/pc_lint.vim
new file mode 100644
index 0000000..a7c95e8
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/pc_lint.vim
@@ -0,0 +1,23 @@
+"============================================================================
+"File: pc_lint.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: Steve Bragg <steve at empresseffects 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_pc_lint_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_pc_lint_checker = 1
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'pc_lint',
+ \ 'redirect': 'c/pc_lint'})
+
+" vim: set sw=4 sts=4 et fdm=marker:
diff --git a/vim/bundle/syntastic/syntax_checkers/cpp/verapp.vim b/vim/bundle/syntastic/syntax_checkers/cpp/verapp.vim
new file mode 100644
index 0000000..af1fd8c
--- /dev/null
+++ b/vim/bundle/syntastic/syntax_checkers/cpp/verapp.vim
@@ -0,0 +1,48 @@
+"============================================================================
+"File: verapp.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: Lucas Verney <phyks@phyks.me>
+"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.
+"
+" Tested with Vera++ 1.3.0
+"============================================================================
+
+if exists('g:loaded_syntastic_cpp_verapp_checker')
+ finish
+endif
+let g:loaded_syntastic_cpp_verapp_checker = 1
+
+if !exists('g:syntastic_verapp_config_file')
+ let g:syntastic_verapp_config_file = '.syntastic_verapp_config'
+endif
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+function! SyntaxCheckers_cpp_verapp_GetLocList() dict
+ let makeprg = self.makeprgBuild({
+ \ 'args': syntastic#c#ReadConfig(g:syntastic_verapp_config_file),
+ \ 'args_after': '--show-rule --no-duplicate -S -c -' })
+
+ let errorformat = '%f:%t:%l:%c:%m'
+
+ return SyntasticMake({
+ \ 'makeprg': makeprg,
+ \ 'errorformat': errorformat,
+ \ 'preprocess': 'checkstyle',
+ \ 'subtype': 'Style' })
+endfunction
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'cpp',
+ \ 'name': 'verapp',
+ \ 'exec': 'vera++'})
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+" vim: set sw=4 sts=4 et fdm=marker: