Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Fix not to create NUL file by tsc in Windows #1155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion syntax_checkers/typescript/tsc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ let s:save_cpo = &cpo
set cpo&vim

function! SyntaxCheckers_typescript_tsc_GetLocList() dict
if syntastic#util#isRunningWindows()
let out = tempname()
elseif
let out = syntastic#util#DevNull()
endif

let makeprg = self.makeprgBuild({
\ 'args': '--module commonjs',
\ 'args_after': '--out ' . syntastic#util#DevNull() })
\ 'args_after': '--out ' . out })

let errorformat =
\ '%E%f %#(%l\,%c): error %m,' .
Expand All @@ -28,6 +34,10 @@ function! SyntaxCheckers_typescript_tsc_GetLocList() dict
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })

if syntastic#util#isRunningWindows()
call delete(out)
endif

call self.setWantSort(1)

return loclist
Expand Down