summaryrefslogtreecommitdiff
path: root/ale_linters/javascript
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-06 20:08:19 +0100
committerw0rp <devw0rp@gmail.com>2017-06-06 20:08:19 +0100
commit7db805b0cd1367ebf866e0c149fd819e425f6e0d (patch)
tree9d2569819a21c2e8b0d82218120821eb2a67cccb /ale_linters/javascript
parentef86a8a389842b4de5196bd458e2014bc63da238 (diff)
downloadale-7db805b0cd1367ebf866e0c149fd819e425f6e0d.zip
#482 - Fix Flow handling with relative paths
Diffstat (limited to 'ale_linters/javascript')
-rw-r--r--ale_linters/javascript/flow.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim
index 4e1494e2..1b13e5d1 100644
--- a/ale_linters/javascript/flow.vim
+++ b/ale_linters/javascript/flow.vim
@@ -42,7 +42,9 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
" Comments have no line of column information, so we skip them.
" In certain cases, `l:message.loc.source` points to a different path
" than the buffer one, thus we skip this loc information too.
- if has_key(l:message, 'loc') && l:line ==# 0 && l:message.loc.source ==# expand('#' . a:buffer . ':p')
+ if has_key(l:message, 'loc')
+ \&& l:line ==# 0
+ \&& ale#path#IsBufferPath(a:buffer, l:message.loc.source)
let l:line = l:message.loc.start.line + 0
let l:col = l:message.loc.start.column + 0
endif