fix(ci): unused vars

This commit is contained in:
Barrett Ruth 2025-09-18 23:51:59 -04:00
parent 3e8ca9011e
commit 8bfbf9937f
3 changed files with 12 additions and 7 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
doc/tags
*.log
build
io
debug
venv/
CLAUDE.md

View file

@ -110,6 +110,10 @@ describe('cp.scrape', function()
stored_data = { platform = platform, contest_id = contest_id, problems = problems }
end
-- Reload the scraper module to pick up the updated mock
package.loaded['cp.scrape'] = nil
scrape = require('cp.scrape')
local result = scrape.scrape_contest_metadata('atcoder', 'abc123')
assert.is_true(result.success)
@ -249,7 +253,7 @@ describe('cp.scrape', function()
assert.is_false(result.success)
assert.is_not_nil(result.error:match('Failed to run metadata scraper'))
assert.is_true(result.error:match('execution failed'))
assert.is_not_nil(result.error:match('execution failed'))
end)
end)

View file

@ -5,13 +5,13 @@ describe('cp test panel', function()
local mock_execute_module
local mock_cache
local mock_log_messages
local temp_files
local _temp_files
local created_buffers
local created_windows
before_each(function()
mock_log_messages = {}
temp_files = {}
_temp_files = {}
created_buffers = {}
created_windows = {}
@ -104,7 +104,7 @@ describe('cp test panel', function()
end,
})
local original_nvim_create_buf = vim.api.nvim_create_buf
local _original_nvim_create_buf = vim.api.nvim_create_buf
vim.api.nvim_create_buf = function(listed, scratch)
local buf_id = #created_buffers + 100
created_buffers[buf_id] = { listed = listed, scratch = scratch }
@ -122,7 +122,7 @@ describe('cp test panel', function()
vim.api.nvim_buf_is_valid = function()
return true
end
vim.api.nvim_win_call = function(win, fn)
vim.api.nvim_win_call = function(_win, fn)
fn()
end
vim.api.nvim_set_current_win = function() end
@ -136,7 +136,7 @@ describe('cp test panel', function()
set = function() end,
}
vim.split = function(str, sep, opts)
vim.split = function(str, sep, _opts)
local result = {}
for part in string.gmatch(str, '[^' .. sep .. ']+') do
table.insert(result, part)
@ -172,7 +172,7 @@ describe('cp test panel', function()
cp.handle_command({ fargs = { 'test' } })
assert.is_true(#created_buffers >= 3)
for buf_id, buf_info in pairs(created_buffers) do
for _buf_id, buf_info in pairs(created_buffers) do
assert.is_false(buf_info.listed)
assert.is_true(buf_info.scratch)
end