Skip to content

Commit 20b9d76

Browse files
committed
Check with luacheck
1 parent 70902fe commit 20b9d76

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

.luacheckrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
read_globals = { "vim" }

lua/snippy/builder.lua

+1-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ local varmap = {
9898
end,
9999
}
100100

101-
Builder = {}
101+
local Builder = {}
102102

103103
function Builder.new(o)
104104
local builder = setmetatable(o, { __index = Builder })
@@ -187,9 +187,7 @@ function Builder:process_structure(structure)
187187
endpos = { self.row, self.col },
188188
})
189189
elseif value.type == 'variable' then
190-
local startrow, startcol = self.row, self.col
191190
self:evaluate_variable(value)
192-
-- table.insert(self.stops, {type=value.type, id=value.id, startpos={startrow, startcol}, endpos={self.row, self.col}, tranform=value.transform})
193191
elseif value.type == 'choice' then
194192
local choice = value.children[1]
195193
local startrow, startcol = self.row, self.col

lua/snippy/parser.lua

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ local pattern = comb.pattern
1111
local opt = comb.opt
1212
local lazy = comb.lazy
1313

14-
local inspect = vim and vim.inspect or require('inspect')
15-
1614
local trim = (vim and vim.trim) or function(s)
1715
return string.gsub(s, '^%s*(.-)%s*$', '%1')
1816
end

lua/snippy/reader/snipmate.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ local function load_scope(scope, stack)
115115
local extends = {}
116116
for _, file in ipairs(list_files(scope)) do
117117
local result = {}
118-
local extended = {}
118+
local extended
119119
if file:match('.snippets$') then
120120
result, extended = read_snippets_file(file)
121121
extends = vim.list_extend(extends, extended)

lua/snippy/stop.lua

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ local shared = require('snippy.shared')
33
local api = vim.api
44
local fn = vim.fn
55

6-
local inspect = (vim and vim.inspect) or require('inspect')
7-
86
local Stop = {}
97

108
function Stop.new(o)

0 commit comments

Comments
 (0)