From c6535538f8717a8f6134020a5bee65341cf8280f Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 28 Sep 2026 14:19:42 +0100 Subject: fix(lua): enable param-type-mismatch diagnostic Problem: Argument type mismatches are excluded from EmmyLua checks. Solution: Correct runtime annotations and calls, document local checker workarounds, and enable the diagnostic. AI-assisted --- runtime/lua/vim/fs.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/fs.lua') diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua index 2e4d45e5cb..aeaf7ea638 100644 --- a/runtime/lua/vim/fs.lua +++ b/runtime/lua/vim/fs.lua @@ -94,6 +94,7 @@ function M.dirname(file) return nil end vim.validate('file', file, 'string') + --- @cast file string local dir = vim.fn.fnamemodify(file, ':h') if iswin then return (dir:gsub(os_sep, '/')) @@ -112,6 +113,7 @@ function M.basename(file) return nil end vim.validate('file', file, 'string') + --- @cast file string local name = vim.fn.fnamemodify(file, ':t') if iswin then return (name:gsub(os_sep, '/')) -- cgit