summaryrefslogtreecommitdiff
path: root/ale_linters/less
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-12 11:35:01 +0000
committerw0rp <devw0rp@gmail.com>2017-11-12 11:35:01 +0000
commit7edcb2210b2b60d5eaf81381e5d9443369576c28 (patch)
tree5261596fe241c24b6e1550e04f74db8f6dab9ce3 /ale_linters/less
parentcd5da50531d55c003de495d8b151c60c5dbf26eb (diff)
downloadale-7edcb2210b2b60d5eaf81381e5d9443369576c28.zip
Show problems from other files for lessc
Diffstat (limited to 'ale_linters/less')
-rwxr-xr-xale_linters/less/lessc.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/ale_linters/less/lessc.vim b/ale_linters/less/lessc.vim
index 8b7985a3..108679de 100755
--- a/ale_linters/less/lessc.vim
+++ b/ale_linters/less/lessc.vim
@@ -24,17 +24,24 @@ function! ale_linters#less#lessc#GetCommand(buffer) abort
endfunction
function! ale_linters#less#lessc#Handle(buffer, lines) abort
+ let l:dir = expand('#' . a:buffer . ':p:h')
" Matches patterns like the following:
let l:pattern = '^\(\w\+\): \(.\{-}\) in \(.\{-}\) on line \(\d\+\), column \(\d\+\):$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
- call add(l:output, {
+ let l:item = {
\ 'lnum': l:match[4] + 0,
\ 'col': l:match[5] + 0,
\ 'text': l:match[2],
\ 'type': 'E',
- \})
+ \}
+
+ if l:match[3] isnot# '-'
+ let l:item.filename = ale#path#GetAbsPath(l:dir, l:match[3])
+ endif
+
+ call add(l:output, l:item)
endfor
return l:output