Merge pull request #467 from adriaanzon/php-fix-double-errors

PHP: Fix double errors and support fatal errors
This commit is contained in:
w0rp
2017-04-12 23:58:01 +01:00
committed by w0rp
parent a55f941349
commit a1932b7ff5
2 changed files with 12 additions and 2 deletions

View File

@@ -1,11 +1,11 @@
" Author: Spencer Wood <https://github.com/scwood>
" Author: Spencer Wood <https://github.com/scwood>, Adriaan Zonnenberg <amz@adriaan.xyz>
" Description: This file adds support for checking PHP with php-cli
function! ale_linters#php#php#Handle(buffer, lines) abort
" Matches patterns like the following:
"
" PHP Parse error: syntax error, unexpected ';', expecting ']' in - on line 15
let l:pattern = '\vParse error:\s+(.+unexpected ''(.+)%(expecting.+)@<!''.*|.+) in - on line (\d+)'
let l:pattern = '\vPHP %(Fatal|Parse) error:\s+(.+unexpected ''(.+)%(expecting.+)@<!''.*|.+) in - on line (\d+)'
let l:output = []