From cebe7c39183b565b393d52fe9dadbf138c830b59 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 10 Dec 2017 09:58:33 +0000 Subject: Fix #1210 - Do not report this file as a temporary file in the quickfix list for TSLint --- ale_linters/typescript/tslint.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ale_linters') diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index a1bfbb71..f4b48169 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -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 -- cgit v1.2.3