Skip to content
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
11 changes: 1 addition & 10 deletions runtime/plugins/linter/linter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function onExit(output, args)
elseif col == nil then
hascol = false
end
if basename(buf.Path) == basename(file) then
if filepath.Base(buf.Path) == filepath.Base(file) then
local bmsg = nil
if hascol then
local mstart = buffer.Loc(tonumber(col-1+coff), tonumber(line-1+loff))
Expand All @@ -212,12 +212,3 @@ function split(str, sep)
end
return result
end

function basename(file)
local sep = "/"
if runtime.GOOS == "windows" then
sep = "\\"
end
local name = string.gsub(file, "(.*" .. sep .. ")(.*)", "%2")
return name
end