Skip to content

Commit 8d7ebd2

Browse files
committed
fusion, class_spec: fix to be luacheck 0.19 compatible
1 parent 29b7769 commit 8d7ebd2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

fusion/core/parsers/source.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
local lexer = require("fusion.core.lexer")
55
local lfs = require("lfs")
6-
local unpack = unpack or table.unpack -- luacheck: ignore 113
6+
local unpack = unpack or table.unpack -- luacheck: ignore 113 143
77

88
local parser = {}
99
local handlers = {}
@@ -663,14 +663,14 @@ function parser.search_for(module_name)
663663
local module_path = module_name:gsub("%.", "/")
664664

665665
local file_path
666-
for _, path in ipairs(package.fusepath_t) do
666+
for _, path in ipairs(package.fusepath_t) do -- luacheck: ignore 143
667667
file_path = path:gsub("?", module_path)
668668
if lfs.attributes(file_path) then
669669
return function() return parser.do_file(file_path) end, file_path
670670
end
671671
end
672672
local msg = {}
673-
for _, path in ipairs(package.fusepath_t) do
673+
for _, path in ipairs(package.fusepath_t) do -- luacheck: ignore 143
674674
msg[#msg + 1] = ("\tno file %q"):format(path:gsub("?", module_path))
675675
end
676676
return "\n" .. table.concat(msg, "\n")
@@ -681,16 +681,16 @@ end
681681
-- @usage parser.inject_loader(); print(require("test_module"))
682682
-- -- Attempts to load a FusionScript `test_module` package
683683
function parser.inject_loader()
684-
for _, loader in ipairs(package.loaders or package.searchers) do
684+
for _, loader in ipairs(package.loaders or package.searchers) do -- luacheck: ignore 143
685685
if loader == parser.search_for then
686686
return false
687687
end
688688
end
689-
table.insert(package.loaders or package.searchers, 2, parser.search_for)
689+
table.insert(package.loaders or package.searchers, 2, parser.search_for) -- luacheck: ignore 143
690690
return true
691691
end
692692

693-
if not package.fusepath then
693+
if not package.fusepath then -- luacheck: ignore 143
694694
local paths = {}
695695
for path in package.path:gmatch("[^;]+") do
696696
local match = path:match("^(.+)%.lua$")
@@ -701,8 +701,8 @@ if not package.fusepath then
701701
paths[#paths + 1] = match .. ".fuse"
702702
end
703703
end
704-
package.fusepath = table.concat(paths, ";")
705-
package.fusepath_t = paths
704+
package.fusepath = table.concat(paths, ";") -- luacheck: ignore 142
705+
package.fusepath_t = paths -- luacheck: ignore 142
706706
end
707707

708708
return parser

fusion/stdlib/functional.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- Module for "functional" iterators and functions.
22
-- @module fusion.stdlib.functional
3-
local unpack = unpack or table.unpack -- luacheck: ignore 113
3+
local unpack = unpack or table.unpack -- luacheck: ignore 113 143
44

55
--- Iterate over a table's keys and values
66
-- @tparam table input

fusion/stdlib/table.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- luacheck: ignore 122
1+
-- luacheck: ignore 122 142
22

33
function table.copy(t0)
44
local t1 = {}
@@ -48,6 +48,6 @@ function table.slice(t, start, stop)
4848
end)
4949
end
5050

51-
table.unpack = unpack or table.unpack -- luacheck: ignore 113
51+
table.unpack = unpack or table.unpack -- luacheck: ignore 113 143
5252

5353
return table

spec/class_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local class = require("fusion.stdlib.class")
22

3-
local unpack = unpack or table.unpack -- luacheck: ignore 113
3+
local unpack = unpack or table.unpack -- luacheck: ignore 113 143
44
describe("class", function()
55
it("can make a simple class", function()
66
local x = class({}, {}, "Test")

0 commit comments

Comments
 (0)