fix(ci): unused vars

This commit is contained in:
Barrett Ruth 2025-09-22 23:05:52 -04:00
parent 7ad64677a5
commit 76cb1e456e
5 changed files with 9 additions and 9 deletions

View file

@ -27,7 +27,7 @@ function M.kill_job(job_id)
end
function M.kill_all_jobs()
for job_id, job in pairs(current_jobs) do
for _, job in pairs(current_jobs) do
job:kill(9)
end
current_jobs = {}

View file

@ -149,7 +149,7 @@ function M.setup_problem_async(contest_id, problem_id, language)
async.finish_contest_operation()
end
function M.start_background_problem_scraping(contest_id, problems, config)
function M.start_background_problem_scraping(contest_id, problems, _)
cache.load()
local platform = state.get_platform() or ''
local missing_problems = {}

View file

@ -140,7 +140,7 @@ describe('async integration', function()
it('handles complete contest setup workflow', function()
local setup_completed = false
local mock_async_setup = {
setup_contest_async = function(contest_id, _)
setup_contest_async = function(contest_id)
assert.equals('abc123', contest_id)
setup_completed = true
end,

View file

@ -26,7 +26,7 @@ describe('cp.async.scraper', function()
end,
}
vim.system = function(cmd, opts, callback)
vim.system = function(cmd, _, callback)
local result = { code = 0, stdout = '{}', stderr = '' }
if cmd[1] == 'ping' then
result = { code = 0 }
@ -77,7 +77,7 @@ describe('cp.async.scraper', function()
end)
it('calls callback with error on network failure', function()
vim.system = function(cmd, opts, callback)
vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then
callback({ code = 1 })
end
@ -107,7 +107,7 @@ describe('cp.async.scraper', function()
end)
it('calls callback with error on subprocess failure', function()
vim.system = function(cmd, opts, callback)
vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then
callback({ code = 0 })
else
@ -125,7 +125,7 @@ describe('cp.async.scraper', function()
end)
it('calls callback with error on invalid JSON', function()
vim.system = function(cmd, opts, callback)
vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then
callback({ code = 0 })
else
@ -156,7 +156,7 @@ describe('cp.async.scraper', function()
end)
it('handles network failure gracefully', function()
vim.system = function(cmd, opts, callback)
vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then
callback({ code = 1 })
end

View file

@ -11,7 +11,7 @@ describe('cp.async.setup', function()
}
mock_scraper = {
scrape_contest_metadata_async = function(platform, contest_id, callback)
scrape_contest_metadata_async = function(_, _, callback)
callback({
success = true,
problems = {