diff --git a/lua/cp/async/jobs.lua b/lua/cp/async/jobs.lua index 17abb35..55ab1bb 100644 --- a/lua/cp/async/jobs.lua +++ b/lua/cp/async/jobs.lua @@ -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 = {} diff --git a/lua/cp/async/setup.lua b/lua/cp/async/setup.lua index 5ff19ae..5e899a3 100644 --- a/lua/cp/async/setup.lua +++ b/lua/cp/async/setup.lua @@ -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 = {} diff --git a/spec/async_integration_spec.lua b/spec/async_integration_spec.lua index fadb6e1..7a90ce1 100644 --- a/spec/async_integration_spec.lua +++ b/spec/async_integration_spec.lua @@ -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, diff --git a/spec/async_scraper_spec.lua b/spec/async_scraper_spec.lua index e6806ee..e0c2836 100644 --- a/spec/async_scraper_spec.lua +++ b/spec/async_scraper_spec.lua @@ -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 diff --git a/spec/async_setup_spec.lua b/spec/async_setup_spec.lua index a22213f..2f2fd83 100644 --- a/spec/async_setup_spec.lua +++ b/spec/async_setup_spec.lua @@ -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 = {