From 5d6a39c945f76d056c2748a6739a5690e3d04587 Mon Sep 17 00:00:00 2001 From: mpaulson Date: Tue, 28 Nov 2023 20:40:54 -0700 Subject: [PATCH] fix: lint --- lua/harpoon2/buffer.lua | 3 ++- lua/harpoon2/config.lua | 3 --- lua/harpoon2/data.lua | 3 +++ lua/harpoon2/init.lua | 1 + lua/harpoon2/test/config_spec.lua | 1 - 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/harpoon2/buffer.lua b/lua/harpoon2/buffer.lua index b09d34e..bc82316 100644 --- a/lua/harpoon2/buffer.lua +++ b/lua/harpoon2/buffer.lua @@ -4,7 +4,8 @@ local M = {} local HARPOON_MENU = "__harpoon-menu__" -- simple reason here is that if we are deving harpoon, we will create several --- ui objects, each with their own buffer, which will cause the name to be duplicated and then we will get a vim error on nvim_buf_set_name +-- ui objects, each with their own buffer, which will cause the name to be +-- duplicated and then we will get a vim error on nvim_buf_set_name local harpoon_menu_id = 0 local function get_harpoon_menu_name() diff --git a/lua/harpoon2/config.lua b/lua/harpoon2/config.lua index 3355cbc..816eb2d 100644 --- a/lua/harpoon2/config.lua +++ b/lua/harpoon2/config.lua @@ -1,6 +1,3 @@ -local Listeners = require("harpoon2.listeners") -local listeners = Listeners.listeners - local M = {} ---@alias HarpoonListItem {value: any, context: any} diff --git a/lua/harpoon2/data.lua b/lua/harpoon2/data.lua index 2bf5e45..b2cd42c 100644 --- a/lua/harpoon2/data.lua +++ b/lua/harpoon2/data.lua @@ -26,9 +26,12 @@ function M.set_data_path(path) end local function has_keys(t) + + -- luacheck: ignore 512 for _ in pairs(t) do return true end + return false end diff --git a/lua/harpoon2/init.lua b/lua/harpoon2/init.lua index c2e8c40..1da18dd 100644 --- a/lua/harpoon2/init.lua +++ b/lua/harpoon2/init.lua @@ -127,6 +127,7 @@ function Harpoon:sync() self.data:sync() end +--luacheck: ignore 212/self function Harpoon:info() return { paths = Data.info(), diff --git a/lua/harpoon2/test/config_spec.lua b/lua/harpoon2/test/config_spec.lua index b28a4a0..4df9340 100644 --- a/lua/harpoon2/test/config_spec.lua +++ b/lua/harpoon2/test/config_spec.lua @@ -1,4 +1,3 @@ -local List = require("harpoon2.list") local Config = require("harpoon2.config") local eq = assert.are.same