1
0
mirror of https://github.com/amix/vimrc synced 2025-06-23 23:15:01 +08:00

Updated plugins

This commit is contained in:
amix
2017-05-02 14:42:08 +02:00
parent c4fbfe8aa8
commit 85e105159e
63 changed files with 1389 additions and 737 deletions

View File

@ -58,15 +58,15 @@ their script to find them.
At the time of this writing, syntastic has checking plugins for ACPI
Source Language, ActionScript, Ada, Ansible configurations, API Blueprint,
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C,
C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, C++,
C#, Cabal, Chef, CMake, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
DocBook, Dockerfile, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata,
GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON,
JSX, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown,
MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl
POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly
Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG,
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript,
JSON, JSX, Julia, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua,
Markdown, MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl,
Perl POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug
(formerly Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax
NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
Zope page templates, and Zsh. See the [manual][checkers] for details about the

View File

@ -8,6 +8,37 @@ set cpo&vim
" Public functions {{{1
function! syntastic#preprocess#bandit(errors) abort " {{{2
let out = []
let json = s:_decode_JSON(join(a:errors, ''))
if type(json) == type({}) && has_key(json, 'results') && type(json['results']) == type([])
for issue in json['results']
if type(issue) == type({})
try
call add(out,
\ issue['filename'] . ':' .
\ issue['line_number'] . ':' .
\ { 'LOW': 'I', 'MEDIUM': 'W', 'HIGH': 'E' }[issue['issue_severity']] . ':' .
\ issue['test_id'][1:] . ':' .
\ issue['issue_text'] .
\ ' [' . issue['test_name'] . '] (confidence: ' . issue['issue_confidence'] . ')')
catch /\m^Vim\%((\a\+)\)\=:E716/
call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue))
let out = []
break
endtry
else
call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue))
endif
endfor
else
call syntastic#log#warn('checker python/bandit: unrecognized error format (crashed checker?)')
endif
return out
endfunction " }}}2
function! syntastic#preprocess#cabal(errors) abort " {{{2
let out = []
let star = 0
@ -435,7 +466,7 @@ echomsg string(out)
endfunction " }}}2
function! syntastic#preprocess#tslint(errors) abort " {{{2
return map(copy(a:errors), 'substitute(v:val, ''\m^\(([^)]\+)\)\s\(.\+\)$'', ''\2 \1'', "")')
return map(copy(a:errors), 'substitute(v:val, ''\v^((ERROR|WARNING): )?\zs(\([^)]+\))\s(.+)$'', ''\4 \3'', "")')
endfunction " }}}2
function! syntastic#preprocess#validator(errors) abort " {{{2

View File

@ -23,6 +23,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
C++......................................|syntastic-checkers-cpp|
Cabal....................................|syntastic-checkers-cabal|
Chef.....................................|syntastic-checkers-chef|
CMake....................................|syntastic-checkers-cmake|
COBOL....................................|syntastic-checkers-cobol|
Coco.....................................|syntastic-checkers-co|
CoffeeScript.............................|syntastic-checkers-coffee|
@ -58,6 +59,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
Java.....................................|syntastic-checkers-java|
JavaScript...............................|syntastic-checkers-javascript|
JSON.....................................|syntastic-checkers-json|
Julia....................................|syntastic-checkers-julia|
LESS.....................................|syntastic-checkers-less|
Lex......................................|syntastic-checkers-lex|
@ -530,12 +532,14 @@ 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. Flawfinder...............|syntastic-c-flawfinder|
8. GCC......................|syntastic-c-gcc|
9. make.....................|syntastic-c-make|
10. OClint..................|syntastic-c-oclint|
11. PC-Lint.................|syntastic-c-pc_lint|
12. Sparse..................|syntastic-c-sparse|
13. Splint..................|syntastic-c-splint|
------------------------------------------------------------------------------
1. AVR-GCC *syntastic-c-avrgcc*
@ -693,7 +697,57 @@ 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. Flawfinder *syntastic-c-flawfinder*
Name: flawfinder
Maintainer: LCD 47 <lcd047@gmail.com>
"Flawfinder" scans C/C++ source code for possible security weaknesses. See the
project's page for more information:
https://www.dwheeler.com/flawfinder
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
Additionally:
*'g:syntastic_c_flawfinder_thres'*
Type: integer
Default: 3
Error threshold. Policy violations with a severity above this value are
highlighted as errors, the others are considered warnings by syntastic.
See also: |syntastic-cpp-flawfinder|.
------------------------------------------------------------------------------
8. GCC *syntastic-c-gcc*
Name: gcc
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -790,7 +844,7 @@ executable.
See also: |syntastic-cpp-gcc|.
------------------------------------------------------------------------------
7. make *syntastic-c-make*
9. make *syntastic-c-make*
Name: make
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -801,7 +855,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*
10. OClint *syntastic-c-oclint*
Name: oclint
Maintainer: "UnCO" Lin <undercooled@lavabit.com>
@ -840,7 +894,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*
11. PC-Lint *syntastic-c-pc_lint*
Name: pc_lint
Maintainer: Steve Bragg <steve@empresseffects.com>
@ -867,7 +921,7 @@ current directory and in parent directories; first such file found is used.
See also: |syntastic-cpp-pc_lint|.
------------------------------------------------------------------------------
10. Sparse *syntastic-c-sparse*
12. Sparse *syntastic-c-sparse*
Name: sparse
Maintainer: Daniel Walker <dwalker@fifo99.com>
@ -899,7 +953,7 @@ your vimrc: >
This allows "Sparse" to read "GCC"'s private include files.
------------------------------------------------------------------------------
11. Splint *syntastic-c-splint*
13. Splint *syntastic-c-splint*
Name: splint
Maintainer: LCD 47 <lcd047@gmail.com>
@ -955,11 +1009,13 @@ 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. Flawfinder...............|syntastic-cpp-flawfinder|
8. GCC......................|syntastic-cpp-gcc|
9. OClint...................|syntastic-cpp-oclint|
10. PC-Lint.................|syntastic-cpp-pc_lint|
11. Vera++..................|syntastic-cpp-verapp|
------------------------------------------------------------------------------
1. AVR-GCC *syntastic-cpp-avrgcc*
@ -1103,7 +1159,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>
@ -1139,7 +1219,33 @@ 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. Flawfinder *syntastic-cpp-flawfinder*
Name: flawfinder
Maintainer: LCD 47 <lcd047@gmail.com>
"Flawfinder" scans C/C++ source code for possible security weaknesses. See the
project's page for more information:
https://www.dwheeler.com/flawfinder
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
Additionally:
*'g:syntastic_cpp_flawfinder_thres'*
Type: integer
Default: 3
Error threshold. Policy violations with a severity above this value are
highlighted as errors, the others are considered warnings by syntastic.
See also: |syntastic-c-flawfinder|.
------------------------------------------------------------------------------
8. GCC *syntastic-cpp-gcc*
Name: gcc
Maintainer: Gregor Uhlenheuer <kongo2002@gmail.com>
@ -1236,7 +1342,7 @@ executable.
See also: |syntastic-c-gcc|.
------------------------------------------------------------------------------
7. OClint *syntastic-cpp-oclint*
9. OClint *syntastic-cpp-oclint*
Name: oclint
Maintainer: "UnCO" Lin <undercooled@lavabit.com>
@ -1276,7 +1382,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*
10. PC-Lint *syntastic-cpp-pc_lint*
Name: pc_lint
Maintainer: Steve Bragg <steve@empresseffects.com>
@ -1303,7 +1409,7 @@ current directory and in parent directories; first such file found is used.
See also: |syntastic-c-pc_lint|.
------------------------------------------------------------------------------
9. Vera++ *syntastic-cpp-verapp*
11. Vera++ *syntastic-cpp-verapp*
Name: verapp
Maintainer: Lucas Verney <phyks@phyks.me>
@ -1381,6 +1487,34 @@ You probably also need a plugin to set |filetype| for Chef files, such as
https://github.com/dougireton/vim-chef
==============================================================================
SYNTAX CHECKERS FOR CMAKE *syntastic-checkers-cmake*
The following checkers are available for CMake (filetype "cmake"):
1. cmakelint................|syntastic-cmake-cmakelint|
------------------------------------------------------------------------------
1. cmakelint *syntastic-cmake-cmakelint*
Name: cmakelint
Maintainer: LCD 47 <lcd047@gmail.com>
"cmakelint" is a style checker for "CMake" files (https://cmake.org/).
See the project's page at GitHub more information:
https://github.com/richq/cmake-lint
Installation~
Install it with "pip": >
pip install cmakelint
<
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
==============================================================================
SYNTAX CHECKERS FOR COBOL *syntastic-checkers-cobol*
@ -2244,10 +2378,37 @@ SYNTAX CHECKERS FOR GETTEXT PO *syntastic-checkers-po*
The following checkers are available for gettext .po files (filetype "po"):
1. msgfmt...................|syntastic-po-msgfmt|
1. Dennis...................|syntastic-po-dennis|
2. msgfmt...................|syntastic-po-msgfmt|
------------------------------------------------------------------------------
1. msgfmt *syntastic-po-msgfmt*
1. Dennis *syntastic-po-dennis*
Name: dennis
Maintainer: LCD 47 <lcd047@gmail.com>
"Dennis" is a set of utilities for working with gettext Portable Object
(http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
translation files:
https://github.com/willkg/dennis/
See the program's manual for further details:
http://dennis.readthedocs.io/en/latest/linting.html
Installation~
Install it with "pip": >
pip install dennis
<
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
2. msgfmt *syntastic-po-msgfmt*
Name: msgfmt
Maintainer: Ryo Okubo <syucream1031@gmail.com>
@ -3591,6 +3752,44 @@ Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
==============================================================================
SYNTAX CHECKERS FOR JULIA *syntastic-checkers-julia*
The following checkers are available for Julia (filetype "julia"):
1. lint.....................|syntastic-julia-lint|
------------------------------------------------------------------------------
1. lint *syntastic-julia-lint*
Name: lint
Maintainer: LCD 47 <lcd047@gmail.com>
This is a checker for Julia files (https://julialang.org/), using the Julia
package "Lint". See the package's documentation for more information:
http://lintjl.readthedocs.io/
Installation~
You need to install Julia itself, and the package "Lint". You can install
"Lint" from the Julia package manager, with the command: >
Pkg.add("Lint")
<
Checker Options~
This checker doesn't call the "makeprgBuild()" function, and thus it ignores
the usual 'g:syntastic_julia_lint_<option>' variables. The only exception is
'g:syntastic_julia_lint_exec', which can still be used to override the "julia"
executable.
Note~
You probably also need a plugin to set |filetype| for Julia files, such as
"julia-vim":
https://github.com/JuliaEditorSupport/julia-vim
==============================================================================
SYNTAX CHECKERS FOR LESS *syntastic-checkers-less*
@ -4629,20 +4828,49 @@ SYNTAX CHECKERS FOR PYTHON *syntastic-checkers-python*
The following checkers are available for Python (filetype "python"):
1. flake8...................|syntastic-python-flake8|
2. Frosted..................|syntastic-python-frosted|
3. mypy.....................|syntastic-python-mypy|
4. Prospector...............|syntastic-python-prospector|
5. py3kwarn.................|syntastic-python-py3kwarn|
6. pycodestyle..............|syntastic-python-pycodestyle|
7. pydocstyle...............|syntastic-python-pydocstyle|
8. Pyflakes.................|syntastic-python-pyflakes|
9. Pylama...................|syntastic-python-pylama|
10. Pylint..................|syntastic-python-pylint|
11. python..................|syntastic-python-python|
1. Bandit...................|syntastic-python-bandit|
2. flake8...................|syntastic-python-flake8|
3. Frosted..................|syntastic-python-frosted|
4. mypy.....................|syntastic-python-mypy|
5. Prospector...............|syntastic-python-prospector|
6. py3kwarn.................|syntastic-python-py3kwarn|
7. pycodestyle..............|syntastic-python-pycodestyle|
8. pydocstyle...............|syntastic-python-pydocstyle|
9. Pyflakes.................|syntastic-python-pyflakes|
10. Pylama..................|syntastic-python-pylama|
11. Pylint..................|syntastic-python-pylint|
12. python..................|syntastic-python-python|
------------------------------------------------------------------------------
1. flake8 *syntastic-python-flake8*
1. Bandit *syntastic-python-bandit*
Name: bandit
Maintainer: LCD 47 <lcd047@gmail.com>
"Bandit" is an AST-based static analyzer for Python from OpenStack Security
Group (http://openstack.org). See the project's official documentation for
details:
https://wiki.openstack.org/wiki/Security/Projects/Bandit
Installation~
Install it with "pip": >
pip install bandit
<
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
Note~
In order to check all files in a project, rather than the current file: >
let g:syntastic_python_bandit_fname = ['/path/to/project']
let g:syntastic_python_bandit_args = '-r'
<
------------------------------------------------------------------------------
2. flake8 *syntastic-python-flake8*
Name: flake8
Maintainers: Sylvain Soliman <Sylvain.Soliman+git@gmail.com>
@ -4662,7 +4890,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
2. Frosted *syntastic-python-frosted*
3. Frosted *syntastic-python-frosted*
Name: frosted
Maintainer: LCD 47 <lcd047@gmail.com>
@ -4678,7 +4906,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
3. mypy *syntastic-python-mypy*
4. mypy *syntastic-python-mypy*
Name: mypy
Maintainer: Russ Hewgill <Russ.Hewgill@gmail.com>
@ -4694,7 +4922,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
4. Prospector *syntastic-python-prospector*
5. Prospector *syntastic-python-prospector*
Name: prospector
Maintainer: LCD 47 <lcd047@gmail.com>
@ -4717,7 +4945,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
5. py3kwarn *syntastic-python-py3kwarn*
6. py3kwarn *syntastic-python-py3kwarn*
Name: py3kwarn
Author: Liam Curry <liam@curry.name>
@ -4733,7 +4961,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
6. pycodestyle *syntastic-python-pycodestyle*
7. pycodestyle *syntastic-python-pycodestyle*
Name: pycodestyle
Maintainer: LCD 47 <lcd047@gmail.com>
@ -4750,7 +4978,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
7. pydocstyle *syntastic-python-pydocstyle*
8. pydocstyle *syntastic-python-pydocstyle*
Name: pydocstyle
Maintainer: LCD 47 <lcd047@gmail.com>
@ -4768,7 +4996,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
8. Pyflakes *syntastic-python-pyflakes*
9. Pyflakes *syntastic-python-pyflakes*
Name: pyflakes
Authors: Martin Grenfell <martin.grenfell@gmail.com>
@ -4786,7 +5014,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
9. Pylama *syntastic-python-pylama*
10. Pylama *syntastic-python-pylama*
Name: pylama
Maintainer: LCD 47 <lcd047@gmail.com>
@ -4812,7 +5040,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
------------------------------------------------------------------------------
10. Pylint *syntastic-python-pylint*
11. Pylint *syntastic-python-pylint*
Name: pylint
Author: Parantapa Bhattacharya <parantapa@gmail.com>
@ -4842,7 +5070,7 @@ recognise any messages. Example: >
\ '--msg-template="{path}:{line}:{column}:{C}: [{symbol} {msg_id}] {msg}"'
<
------------------------------------------------------------------------------
11. python *syntastic-python-python*
12. python *syntastic-python-python*
Name: python
Maintainer: LCD 47 <lcd047@gmail.com>

View File

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

View File

@ -19,6 +19,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'c': ['gcc'],
\ 'cabal': ['cabal'],
\ 'chef': ['foodcritic'],
\ 'cmake': ['cmakelint'],
\ 'co': ['coco'],
\ 'cobol': ['cobc'],
\ 'coffee': ['coffee', 'coffeelint'],
@ -50,6 +51,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'java': ['javac'],
\ 'javascript': ['jshint', 'jslint'],
\ 'json': ['jsonlint', 'jsonval'],
\ 'julia': [],
\ 'less': ['lessc'],
\ 'lex': ['flex'],
\ 'limbo': ['limbo'],

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

View File

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

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:

View File

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

View File

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

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

View File

@ -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%.%#,'.

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

View File

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

View File

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

View File

@ -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 !=# ''