fix lint
This commit is contained in:
parent
62c4d1e89e
commit
646b0047dc
2 changed files with 3 additions and 3 deletions
|
|
@ -300,8 +300,9 @@ function M.run_problem(contest_config, is_debug)
|
||||||
local platform = state.get_platform()
|
local platform = state.get_platform()
|
||||||
local contest_id = state.get_contest_id()
|
local contest_id = state.get_contest_id()
|
||||||
local problem_id = state.get_problem_id()
|
local problem_id = state.get_problem_id()
|
||||||
|
local expected_file = state.get_expected_file()
|
||||||
|
|
||||||
if not platform or not contest_id then
|
if not platform or not contest_id or not expected_file then
|
||||||
logger.log('configure a contest before running a problem', vim.log.levels.ERROR)
|
logger.log('configure a contest before running a problem', vim.log.levels.ERROR)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
@ -310,7 +311,6 @@ function M.run_problem(contest_config, is_debug)
|
||||||
|
|
||||||
local run_cmd = build_command(language_config.test, language_config.executable, substitutions)
|
local run_cmd = build_command(language_config.test, language_config.executable, substitutions)
|
||||||
local exec_result = execute_command(run_cmd, input_data, timeout_ms)
|
local exec_result = execute_command(run_cmd, input_data, timeout_ms)
|
||||||
local expected_file = state.get_expected_file()
|
|
||||||
local formatted_output = format_output(exec_result, expected_file, is_debug)
|
local formatted_output = format_output(exec_result, expected_file, is_debug)
|
||||||
|
|
||||||
local output_buf = vim.fn.bufnr(output_file)
|
local output_buf = vim.fn.bufnr(output_file)
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ describe('Panel integration', function()
|
||||||
state.set_problem_id('b')
|
state.set_problem_id('b')
|
||||||
|
|
||||||
local config_module = require('cp.config')
|
local config_module = require('cp.config')
|
||||||
local processed_config = config_module.setup({
|
config_module.setup({
|
||||||
contests = { codeforces = { cpp = { extension = 'cpp' } } },
|
contests = { codeforces = { cpp = { extension = 'cpp' } } },
|
||||||
})
|
})
|
||||||
local cp_state = require('cp.state')
|
local cp_state = require('cp.state')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue