From 1ae871e39d08092179933fd32e49bd5e2b36f916 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Wed, 20 Mar 2013 09:07:07 +0200 Subject: [PATCH] Cleanup: defer to php/phpcs.vim. --- syntax_checkers/css/phpcs.vim | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/syntax_checkers/css/phpcs.vim b/syntax_checkers/css/phpcs.vim index 3a296eb1..aebedac5 100644 --- a/syntax_checkers/css/phpcs.vim +++ b/syntax_checkers/css/phpcs.vim @@ -18,17 +18,14 @@ if exists("g:loaded_syntastic_css_phpcs_checker") endif let g:loaded_syntastic_css_phpcs_checker=1 +runtime syntax_checkers/php/phpcs.vim + function! SyntaxCheckers_css_phpcs_IsAvailable() - return executable('phpcs') + return SyntaxCheckers_php_phpcs_IsAvailable() endfunction function! SyntaxCheckers_css_phpcs_GetLocList() - let makeprg = syntastic#makeprg#build({ - \ 'exe': 'phpcs', - \ 'args': '--report=csv', - \ 'subchecker': 'phpcs' }) - let errorformat = '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]' - return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype': 'Style' }) + return SyntaxCheckers_php_phpcs_GetLocList() endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({