php: fix phpmd to use post_args

PHP mess detector expects the filename as the first argument, followed
by the output format and the rules. To fix this, use the 'post_args' to
provide the arguments.
Also change the subchecker to 'phpmd' instead of 'phpcs'.
This commit is contained in:
Jeroen Budts 2013-01-24 16:58:08 +01:00
parent 8095909dcc
commit f144091b59

View File

@ -89,8 +89,8 @@ endfunction
function! s:GetPHPMDErrors()
let makeprg = syntastic#makeprg#build({
\ 'exe': 'phpmd',
\ 'args': 'text ' . g:syntastic_phpmd_rules,
\ 'subchecker': 'phpcs' })
\ 'post_args': 'text ' . g:syntastic_phpmd_rules,
\ 'subchecker': 'phpmd' })
let errorformat = '%E%f:%l%m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype' : 'Style' })
endfunction