From 141dc6d55e4f53ee9527adc164a0d39725394bfd Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Wed, 9 Dec 2020 21:46:41 +0100 Subject: ci: Add luacheck ci job (#317) * Add luacheck ci job * Fix most of the linting issues * fixup: lint Co-authored-by: TJ DeVries --- lua/telescope/path.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'lua/telescope/path.lua') diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua index cdfbc48..0a47a83 100644 --- a/lua/telescope/path.lua +++ b/lua/telescope/path.lua @@ -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) -- cgit v1.2.3