New checker cppclean for C/C++.

This commit is contained in:
LCD 47 2017-04-25 19:38:07 +03:00
parent 4a7633c9f2
commit 5687aad671
4 changed files with 135 additions and 23 deletions

View File

@ -531,12 +531,13 @@ The following checkers are available for C (filetype "c"):
3. ClangCheck...............|syntastic-c-clang_check|
4. Clang-Tidy...............|syntastic-c-clang_tidy|
5. Cppcheck.................|syntastic-c-cppcheck|
6. GCC......................|syntastic-c-gcc|
7. make.....................|syntastic-c-make|
8. OClint...................|syntastic-c-oclint|
9. PC-Lint..................|syntastic-c-pc_lint|
10. Sparse..................|syntastic-c-sparse|
11. Splint..................|syntastic-c-splint|
6. cppclean.................|syntastic-c-cppclean|
7. GCC......................|syntastic-c-gcc|
8. make.....................|syntastic-c-make|
9. OClint...................|syntastic-c-oclint|
10. PC-Lint.................|syntastic-c-pc_lint|
11. Sparse..................|syntastic-c-sparse|
12. Splint..................|syntastic-c-splint|
------------------------------------------------------------------------------
1. AVR-GCC *syntastic-c-avrgcc*
@ -694,7 +695,31 @@ one option per line (cf. |syntastic-config-files|).
See also: |syntastic-cpp-cppcheck|.
------------------------------------------------------------------------------
6. GCC *syntastic-c-gcc*
6. cppclean *syntastic-c-cppclean*
Name: cppclean
Maintainer: LCD 47 <lcd047@gmail.com>
"cppclean" attempts to find problems in C++ source that slow development in
large code bases, for example various forms of unused code. See the project's
page at GitHub for more information:
https://github.com/myint/cppclean
Installation~
Install it with "pip": >
pip install cppclean
<
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
See also: |syntastic-cpp-cppclean|.
------------------------------------------------------------------------------
7. GCC *syntastic-c-gcc*
Name: gcc
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -791,7 +816,7 @@ executable.
See also: |syntastic-cpp-gcc|.
------------------------------------------------------------------------------
7. make *syntastic-c-make*
8. make *syntastic-c-make*
Name: make
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -802,7 +827,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
8. OClint *syntastic-c-oclint*
9. OClint *syntastic-c-oclint*
Name: oclint
Maintainer: "UnCO" Lin <undercooled@lavabit.com>
@ -841,7 +866,7 @@ Config files pointed to by 'g:syntastic_oclint_config_file' are then ignored.
See also: |syntastic-cpp-oclint|.
------------------------------------------------------------------------------
9. PC-Lint *syntastic-c-pc_lint*
10. PC-Lint *syntastic-c-pc_lint*
Name: pc_lint
Maintainer: Steve Bragg <steve@empresseffects.com>
@ -868,7 +893,7 @@ current directory and in parent directories; first such file found is used.
See also: |syntastic-cpp-pc_lint|.
------------------------------------------------------------------------------
10. Sparse *syntastic-c-sparse*
11. Sparse *syntastic-c-sparse*
Name: sparse
Maintainer: Daniel Walker <dwalker@fifo99.com>
@ -900,7 +925,7 @@ your vimrc: >
This allows "Sparse" to read "GCC"'s private include files.
------------------------------------------------------------------------------
11. Splint *syntastic-c-splint*
12. Splint *syntastic-c-splint*
Name: splint
Maintainer: LCD 47 <lcd047@gmail.com>
@ -956,11 +981,12 @@ The following checkers are available for C++ (filetype "cpp"):
2. ClangCheck...............|syntastic-cpp-clang_check|
3. Clang-Tidy...............|syntastic-cpp-clang_tidy|
4. Cppcheck.................|syntastic-cpp-cppcheck|
5. Cpplint..................|syntastic-cpp-cpplint|
6. GCC......................|syntastic-cpp-gcc|
7. OClint...................|syntastic-cpp-oclint|
8. PC-Lint..................|syntastic-cpp-pc_lint|
9. Vera++...................|syntastic-cpp-verapp|
5. cppclean.................|syntastic-cpp-cppclean|
6. Cpplint..................|syntastic-cpp-cpplint|
7. GCC......................|syntastic-cpp-gcc|
8. OClint...................|syntastic-cpp-oclint|
9. PC-Lint..................|syntastic-cpp-pc_lint|
10. Vera++..................|syntastic-cpp-verapp|
------------------------------------------------------------------------------
1. AVR-GCC *syntastic-cpp-avrgcc*
@ -1104,7 +1130,31 @@ one option per line (cf. |syntastic-config-files|).
See also: |syntastic-c-cppcheck|.
------------------------------------------------------------------------------
5. Cpplint *syntastic-cpp-cpplint*
5. cppclean *syntastic-cpp-cppclean*
Name: cppclean
Maintainer: LCD 47 <lcd047@gmail.com>
"cppclean" attempts to find problems in C++ source that slow development in
large code bases, for example various forms of unused code. See the project's
page at GitHub for more information:
https://github.com/myint/cppclean
Installation~
Install it with "pip": >
pip install cppclean
<
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
See also: |syntastic-c-cppclean|.
------------------------------------------------------------------------------
6. Cpplint *syntastic-cpp-cpplint*
Name: cpplint
Maintainer: LCD 47 <lcd047@gmail.com>
@ -1140,7 +1190,7 @@ However, if your "cpplint" was installed with "pip", the script's name is
let g:syntastic_cpp_cpplint_exec = "cpplint"
<
------------------------------------------------------------------------------
6. GCC *syntastic-cpp-gcc*
7. GCC *syntastic-cpp-gcc*
Name: gcc
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -1237,7 +1287,7 @@ executable.
See also: |syntastic-c-gcc|.
------------------------------------------------------------------------------
7. OClint *syntastic-cpp-oclint*
8. OClint *syntastic-cpp-oclint*
Name: oclint
Maintainer: "UnCO" Lin <undercooled@lavabit.com>
@ -1277,7 +1327,7 @@ Config files pointed to by 'g:syntastic_oclint_config_file' are then ignored.
See also: |syntastic-c-oclint|.
------------------------------------------------------------------------------
8. PC-Lint *syntastic-cpp-pc_lint*
9. PC-Lint *syntastic-cpp-pc_lint*
Name: pc_lint
Maintainer: Steve Bragg <steve@empresseffects.com>
@ -1304,7 +1354,7 @@ current directory and in parent directories; first such file found is used.
See also: |syntastic-c-pc_lint|.
------------------------------------------------------------------------------
9. Vera++ *syntastic-cpp-verapp*
10. Vera++ *syntastic-cpp-verapp*
Name: verapp
Maintainer: Lucas Verney <phyks@phyks.me>

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.8.0-47'
let g:_SYNTASTIC_VERSION = '3.8.0-48'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View 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:

View File

@ -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: