#482 - Fix Flow handling with relative paths

This commit is contained in:
w0rp
2017-06-06 20:08:19 +01:00
parent ef86a8a389
commit 7db805b0cd
4 changed files with 131 additions and 46 deletions

View File

@@ -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