From ef14a044703a51b70e318713b8ae4ba809150278 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Tue, 11 Oct 2016 08:54:41 -0500 Subject: [PATCH] Make HandleUnixFormat Windows-compatible --- autoload/ale/handlers.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/ale/handlers.vim b/autoload/ale/handlers.vim index ed846ab..cca35d4 100644 --- a/autoload/ale/handlers.vim +++ b/autoload/ale/handlers.vim @@ -4,13 +4,15 @@ scriptencoding utf-8 " linter which outputs warnings and errors in a format accepted by one of " these functions can simply use one of these pre-defined error handlers. +let s:path_pattern = '[a-zA-Z]\?\\\?:\?[[:alnum:]/\.-]\+' + function! s:HandleUnixFormat(buffer, lines, type) abort " Matches patterns line the following: " " file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args " file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) " file.go:5:2: expected declaration, found 'STRING' "log" - let l:pattern = '^[^:]\+:\(\d\+\):\?\(\d\+\)\?: \(.\+\)$' + let l:pattern = '^' . s:path_pattern . ':\(\d\+\):\?\(\d\+\)\?: \(.\+\)$' let l:output = [] for l:line in a:lines