Fix #1210 - Do not report this file as a temporary file in the quickfix list for TSLint

This commit is contained in:
w0rp
2017-12-10 09:58:33 +00:00
parent fcfd1025cc
commit cebe7c3918
2 changed files with 34 additions and 2 deletions

View File

@@ -29,7 +29,6 @@ function! ale_linters#typescript#tslint#Handle(buffer, lines) abort
endif
let l:item = {
\ 'filename': ale#path#GetAbsPath(l:dir, l:error.name),
\ 'type': (get(l:error, 'ruleSeverity', '') is# 'WARNING' ? 'W' : 'E'),
\ 'text': l:error.failure,
\ 'lnum': l:error.startPosition.line + 1,
@@ -38,6 +37,13 @@ function! ale_linters#typescript#tslint#Handle(buffer, lines) abort
\ 'end_col': l:error.endPosition.character + 1,
\}
let l:filename = ale#path#GetAbsPath(l:dir, l:error.name)
" Assume temporary files are this file.
if !ale#path#IsTempName(l:filename)
let l:item.filename = l:filename
endif
if has_key(l:error, 'ruleName')
let l:item.code = l:error.ruleName
endif