summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorBjorn Neergaard <bjorn@neersighted.com>2016-10-11 08:54:41 -0500
committerBjorn Neergaard <bjorn@neersighted.com>2016-10-11 08:54:41 -0500
commitef14a044703a51b70e318713b8ae4ba809150278 (patch)
treed4832e73b5cb8b57a2c05a9e65ce02733ba379ac /autoload
parent23442a2ec3e9bede0e50f0836e1dbfcafb49c05a (diff)
downloadale-ef14a044703a51b70e318713b8ae4ba809150278.zip
Make HandleUnixFormat Windows-compatible
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/autoload/ale/handlers.vim b/autoload/ale/handlers.vim
index ed846abb..cca35d46 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