File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function! ale_linters#swift#swiftpm#Handle(buffer, lines)
25
25
" Match and capture line number
26
26
" Match and capture column number
27
27
" Match and capture anything in the message
28
- let l: pattern = ' ^[^:]\+:\(\d\+\):\(\d\+\):\s*error:\s*\(.*\)$'
28
+ let l: pattern = ' ^[^:]\+:\(\d\+\):\(\d\+\):\s*\( error\|warning\) :\s*\(.*\)$'
29
29
let l: output = []
30
30
31
31
for l: line in a: lines
@@ -37,15 +37,23 @@ function! ale_linters#swift#swiftpm#Handle(buffer, lines)
37
37
38
38
let l: line_number = l: match [1 ]
39
39
let l: column = l: match [2 ]
40
- let l: text = l: match [3 ]
40
+ let l: type = l: match [3 ]
41
+ let l: text = l: match [4 ]
42
+ let l: type_identifier = ' N'
43
+
44
+ if l: type == ' error'
45
+ let l: type_identifier = ' E'
46
+ elseif l: type == ' warning'
47
+ let l: type_identifier = ' W'
48
+ endif
41
49
42
50
call add (l: output , {
43
51
\ ' bufnr' : a: buffer ,
44
52
\ ' lnum' : l: line_number ,
45
53
\ ' vcol' : 0 ,
46
54
\ ' col' : l: column ,
47
55
\ ' text' : l: text ,
48
- \ ' type' : ' E ' ,
56
+ \ ' type' : l: type_identifier ,
49
57
\ })
50
58
endfor
51
59
You can’t perform that action at this time.
0 commit comments