summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorJeffrey Lau <who.else.at.jlau.tk>2019-08-31 15:05:49 +0800
committerJeffrey Lau <who.else.at.jlau.tk>2019-08-31 15:08:54 +0800
commit2b12c8ccbf6c6d918b5e4878f4d39f3bf20f3c0b (patch)
tree1a35ffd069f9f1ccbe73f22b57b805f09bb688be /ale_linters
parent73812c3e41c1c7fcf1705811f35ac4c9ccec003e (diff)
downloadale-2b12c8ccbf6c6d918b5e4878f4d39f3bf20f3c0b.zip
linter/sh: Improve parsing of error messages in different locales
Fixes #2687
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/sh/shell.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/ale_linters/sh/shell.vim b/ale_linters/sh/shell.vim
index 189dc21d..171fe64e 100644
--- a/ale_linters/sh/shell.vim
+++ b/ale_linters/sh/shell.vim
@@ -34,8 +34,10 @@ function! ale_linters#sh#shell#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" bash: line 13: syntax error near unexpected token `d'
+ " bash:行0: 未预期的符号“done”附近有语法错误
+ " bash: 列 90: 尋找匹配的「"」時遇到了未預期的檔案結束符
" sh: 11: Syntax error: "(" unexpected
- let l:pattern = '\v(line |: ?)(\d+): (.+)$'
+ let l:pattern = '\v([^:]+:\D*)(\d+): (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)