fix(ci): fomrat

This commit is contained in:
Barrett Ruth 2025-09-21 15:10:27 -04:00
parent 8defe763ad
commit d851dda461
3 changed files with 21 additions and 6 deletions

View file

@ -603,7 +603,10 @@ local function toggle_run_panel(is_debug)
state.test_buffers = test_buffers
state.test_windows = test_windows
local test_state = run.get_run_panel_state()
logger.log(string.format('test panel opened (%d test cases)', #test_state.test_cases), vim.log.levels.INFO)
logger.log(
string.format('test panel opened (%d test cases)', #test_state.test_cases),
vim.log.levels.INFO
)
end
---@param contest_id string
@ -763,7 +766,10 @@ local function handle_cache_command(cmd)
logger.log(('cleared cache for %s'):format(cmd.platform), vim.log.levels.INFO, true)
else
logger.log(
('unknown platform: %s. Available: %s'):format(cmd.platform, table.concat(platforms, ', ')),
('unknown platform: %s. Available: %s'):format(
cmd.platform,
table.concat(platforms, ', ')
),
vim.log.levels.ERROR
)
end
@ -853,7 +859,7 @@ local function parse_command(args)
return {
type = 'cache',
subcommand = 'clear',
platform = platform
platform = platform,
}
else
return { type = 'error', message = 'unknown cache subcommand: ' .. subcommand }

View file

@ -235,7 +235,10 @@ function M.compile_problem(ctx, contest_config, is_debug)
if compile_result.code ~= 0 then
return { success = false, output = compile_result.stdout or 'unknown error' }
end
logger.log(('compilation successful (%s)'):format(is_debug and 'debug mode' or 'test mode'), vim.log.levels.INFO)
logger.log(
('compilation successful (%s)'):format(is_debug and 'debug mode' or 'test mode'),
vim.log.levels.INFO
)
end
return { success = true, output = nil }

View file

@ -351,7 +351,10 @@ describe('cp command parsing', function()
local error_logged = false
for _, log_entry in ipairs(logged_messages) do
if log_entry.level == vim.log.levels.ERROR and log_entry.msg:match('cache command requires subcommand') then
if
log_entry.level == vim.log.levels.ERROR
and log_entry.msg:match('cache command requires subcommand')
then
error_logged = true
break
end
@ -366,7 +369,10 @@ describe('cp command parsing', function()
local error_logged = false
for _, log_entry in ipairs(logged_messages) do
if log_entry.level == vim.log.levels.ERROR and log_entry.msg:match('unknown cache subcommand') then
if
log_entry.level == vim.log.levels.ERROR
and log_entry.msg:match('unknown cache subcommand')
then
error_logged = true
break
end