mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 07:00:24 +09:00
Merge pull request #564 from DanielPower/master
Replaced tmp directory with file directory
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user