diff options
author | Bjorn Neergaard <bjorn@neersighted.com> | 2016-10-11 08:54:41 -0500 |
---|---|---|
committer | Bjorn Neergaard <bjorn@neersighted.com> | 2016-10-11 08:54:41 -0500 |
commit | ef14a044703a51b70e318713b8ae4ba809150278 (patch) | |
tree | d4832e73b5cb8b57a2c05a9e65ce02733ba379ac /autoload | |
parent | 23442a2ec3e9bede0e50f0836e1dbfcafb49c05a (diff) | |
download | ale-ef14a044703a51b70e318713b8ae4ba809150278.zip |
Make HandleUnixFormat Windows-compatible
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers.vim | 4 |
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 |