fix(ci): fomrat
This commit is contained in:
parent
8defe763ad
commit
d851dda461
3 changed files with 21 additions and 6 deletions
|
|
@ -603,7 +603,10 @@ local function toggle_run_panel(is_debug)
|
||||||
state.test_buffers = test_buffers
|
state.test_buffers = test_buffers
|
||||||
state.test_windows = test_windows
|
state.test_windows = test_windows
|
||||||
local test_state = run.get_run_panel_state()
|
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
|
end
|
||||||
|
|
||||||
---@param contest_id string
|
---@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)
|
logger.log(('cleared cache for %s'):format(cmd.platform), vim.log.levels.INFO, true)
|
||||||
else
|
else
|
||||||
logger.log(
|
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
|
vim.log.levels.ERROR
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
@ -853,7 +859,7 @@ local function parse_command(args)
|
||||||
return {
|
return {
|
||||||
type = 'cache',
|
type = 'cache',
|
||||||
subcommand = 'clear',
|
subcommand = 'clear',
|
||||||
platform = platform
|
platform = platform,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return { type = 'error', message = 'unknown cache subcommand: ' .. subcommand }
|
return { type = 'error', message = 'unknown cache subcommand: ' .. subcommand }
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,10 @@ function M.compile_problem(ctx, contest_config, is_debug)
|
||||||
if compile_result.code ~= 0 then
|
if compile_result.code ~= 0 then
|
||||||
return { success = false, output = compile_result.stdout or 'unknown error' }
|
return { success = false, output = compile_result.stdout or 'unknown error' }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
return { success = true, output = nil }
|
return { success = true, output = nil }
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,10 @@ describe('cp command parsing', function()
|
||||||
|
|
||||||
local error_logged = false
|
local error_logged = false
|
||||||
for _, log_entry in ipairs(logged_messages) do
|
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
|
error_logged = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
@ -366,7 +369,10 @@ describe('cp command parsing', function()
|
||||||
|
|
||||||
local error_logged = false
|
local error_logged = false
|
||||||
for _, log_entry in ipairs(logged_messages) do
|
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
|
error_logged = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue