Skip to content

Commit 957e3f8

Browse files
committed
Fix lints
1 parent d3cda27 commit 957e3f8

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

build/cyan/config.lua

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/lint.tl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ local function lint()
140140
local counts: {string:integer} = {}
141141

142142
local src_dir <const> = lexical_path.from_os("src")
143-
for path in fs.scan_dir(src_dir, {"cyan/**/*", "testing/**/*"}) do
143+
for path in fs.scan_directory(src_dir, {"cyan/**/*", "testing/**/*"}) do
144144
path = src_dir .. path
145145
errors = {}
146146
local real_path <const> = path:to_string()

src/cyan/config.tl

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,17 +209,16 @@ function config.is_config(c_in: any): Config, {string}, {string}
209209
.. "}}"
210210
)
211211
break
212-
else
213-
result.scripts[script_key as string] = {}
214-
for hook_name, path_or_paths in pairs(value as table) do
215-
if hook_name is string then
216-
local t = {}
217-
result.scripts[script_key as string][hook_name] = t
218-
local paths: {any} = path_or_paths is table and path_or_paths or {path_or_paths}
219-
for i, path in ipairs(paths) do
220-
if path is string then
221-
t[i] = to_path(path, ("%s%s %s hook"):format(i, ordinal_indicator(i), hook_name))
222-
end
212+
end
213+
result.scripts[script_key as string] = {}
214+
for hook_name, path_or_paths in pairs(value as table) do
215+
if hook_name is string then
216+
local t = {}
217+
result.scripts[script_key as string][hook_name] = t
218+
local paths: {any} = path_or_paths is table and path_or_paths or {path_or_paths}
219+
for i, path in ipairs(paths) do
220+
if path is string then
221+
t[i] = to_path(path, ("%s%s %s hook"):format(i, ordinal_indicator(i), hook_name))
223222
end
224223
end
225224
end

0 commit comments

Comments
 (0)