php: fix output of lint if display_errors is off
display_errors might be turned of for php globally. In this case the output of php -l does not contain the errors messages. Using this option will turn the option on for the single call.
This commit is contained in:
parent
08d30dfa43
commit
c751a5ac77
@ -38,7 +38,7 @@ function! SyntaxCheckers_php_GetLocList()
|
|||||||
|
|
||||||
let errors = []
|
let errors = []
|
||||||
|
|
||||||
let makeprg = "php -l ".shellescape(expand('%'))
|
let makeprg = "php -l -d display_errors=1 ".shellescape(expand('%'))
|
||||||
let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l'
|
let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l'
|
||||||
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user