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:
parent
8095909dcc
commit
f144091b59
@ -89,8 +89,8 @@ endfunction
|
|||||||
function! s:GetPHPMDErrors()
|
function! s:GetPHPMDErrors()
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'phpmd',
|
\ 'exe': 'phpmd',
|
||||||
\ 'args': 'text ' . g:syntastic_phpmd_rules,
|
\ 'post_args': 'text ' . g:syntastic_phpmd_rules,
|
||||||
\ 'subchecker': 'phpcs' })
|
\ 'subchecker': 'phpmd' })
|
||||||
let errorformat = '%E%f:%l%m'
|
let errorformat = '%E%f:%l%m'
|
||||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype' : 'Style' })
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype' : 'Style' })
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user