From d00562d37a3b79cc6f36860d3a6ebc9c1264e34d Mon Sep 17 00:00:00 2001 From: Daniel Power Date: Sun, 26 Feb 2017 02:21:19 -0330 Subject: [PATCH] Replaced tmp directory with file directory --- runtime/plugins/linter/linter.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/plugins/linter/linter.lua b/runtime/plugins/linter/linter.lua index 2a231af0..c97a898d 100644 --- a/runtime/plugins/linter/linter.lua +++ b/runtime/plugins/linter/linter.lua @@ -12,15 +12,15 @@ end function runLinter() local ft = CurView().Buf:FileType() local file = CurView().Buf.Path - local devnull = "/dev/null" - local temp = os.getenv("TMPDIR") + local dir = DirectoryName(file) if OS == "windows" then devnull = "NUL" - temp = os.getenv("TEMP") + else + devnull = "/dev/null" end if ft == "go" then lint("gobuild", "go", {"build", "-o", devnull}, "%f:%l: %m") - lint("golint", "golint", {CurView().Buf.Path}, "%f:%l:%d+: %m") + lint("golint", "golint", {file}, "%f:%l:%d+: %m") elseif ft == "lua" then lint("luacheck", "luacheck", {"--no-color", file}, "%f:%l:%d+: %m") elseif ft == "python" then @@ -38,7 +38,7 @@ function runLinter() elseif ft == "d" then lint("dmd", "dmd", {"-color=off", "-o-", "-w", "-wi", "-c", file}, "%f%(%l%):.+: %m") elseif ft == "java" then - lint("javac", "javac", {"-d", temp, file}, "%f:%l: error: %m") + lint("javac", "javac", {"-d", dir, file}, "%f:%l: error: %m") elseif ft == "javascript" then lint("jshint", "jshint", {file}, "%f: line %l,.+, %m") elseif ft == "nim" then