syntastic git · master
syntastic vim plugin (fork)
Vim Script 99%git clone https://git.christianimmanuel.de/mirrors-forks/syntastic.gitwget https://git.christianimmanuel.de/mirrors-forks/syntastic/archive/syntastic.tar.gzNew checker for twig: twigcs (@Ciloe).
doc/syntastic-checkers.txt | 17 +++++++++++++++++ plugin/syntastic.vim | 2 +- syntax_checkers/twig/twigcs.vim | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 4484764e..e49c1b4b 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -7120,6 +7120,7 @@ SYNTAX CHECKERS FOR TWIG *syntastic-checkers-twig* The following checkers are available for Twig (filetype "twig"): 1. twig-lint................|syntastic-twig-twiglint| + 2. twigcs...................|syntastic-twig-twigcs| ------------------------------------------------------------------------------ 1. twig-lint *syntastic-twig-twiglint* @@ -7146,6 +7147,22 @@ For the standalone executable, add the following to your vimrc file: > For the "Composer" (https://getcomposer.org/) dependency "twig-lint" must be in your "$PATH". No further configuration is needed. +------------------------------------------------------------------------------ +2. twigcs *syntastic-twig-twigcs* + +Name: twigcs +Maintainer: Ciloe <escrichjimmy@yahoo.fr> + +"twigcs" is a lint tool for Twig templates. See the project's page at +GitHub for details: + + https://github.com/friendsoftwig/twigcs + +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 TYPESCRIPT *syntastic-checkers-typescript* diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 52d0daf5..82a63bf9 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.10.0-20' +let g:_SYNTASTIC_VERSION = '3.10.0-21' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/twig/twigcs.vim b/syntax_checkers/twig/twigcs.vim new file mode 100644 index 00000000..9dfb43ba --- /dev/null +++ b/syntax_checkers/twig/twigcs.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: twigcs.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: Ciloe <escrichjimmy at yahoo dot fr> +"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_twig_twigcs_checker') + finish +endif +let g:loaded_syntastic_twig_twigcs_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_twig_twigcs_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_after': '--reporter=emacs' }) + + let errorformat = + \ '%f:%l:%c: %trror - %m,' . + \ '%f:%l:%c: %tarning - %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'twig', + \ 'name': 'twigcs' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: