ci: Add luacheck ci job (#317)
* Add luacheck ci job * Fix most of the linting issues * fixup: lint Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@ local path = {}
|
||||
path.separator = package.config:sub(1, 1)
|
||||
path.home = vim.fn.expand("~")
|
||||
|
||||
|
||||
path.make_relative = function(filepath, cwd)
|
||||
if not cwd or not filepath then return filepath end
|
||||
|
||||
@@ -83,14 +82,14 @@ path.read_file = function(filepath)
|
||||
end
|
||||
|
||||
path.read_file_async = function(filepath, callback)
|
||||
vim.loop.fs_open(filepath, "r", 438, function(err, fd)
|
||||
assert(not err, err)
|
||||
vim.loop.fs_fstat(fd, function(err, stat)
|
||||
assert(not err, err)
|
||||
vim.loop.fs_read(fd, stat.size, 0, function(err, data)
|
||||
assert(not err, err)
|
||||
vim.loop.fs_close(fd, function(err)
|
||||
assert(not err, err)
|
||||
vim.loop.fs_open(filepath, "r", 438, function(err_open, fd)
|
||||
assert(not err_open, err_open)
|
||||
vim.loop.fs_fstat(fd, function(err_fstat, stat)
|
||||
assert(not err_fstat, err_fstat)
|
||||
vim.loop.fs_read(fd, stat.size, 0, function(err_read, data)
|
||||
assert(not err_read, err_read)
|
||||
vim.loop.fs_close(fd, function(err_close)
|
||||
assert(not err_close, err_close)
|
||||
return callback(data)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user