backport test: lint naming conventions (#39124)

test: lint naming conventions

Problem:
Naming conventions are not automatically checked.

Solution:
Add a check to the doc generator. Eventually we should extract this
somehow, but that will require refactoring the doc generator...

Note: this also checks non-public functions, basically anything that
passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's
a good thing.
This commit is contained in:
Justin M. Keyes
2026-04-16 10:29:50 -04:00
committed by GitHub
parent d89cfa1a8e
commit a1712503d8
14 changed files with 359 additions and 126 deletions

View File

@@ -1071,17 +1071,17 @@ end
--- Execute a lsp command, either via client command function (if available)
--- or via workspace/executeCommand (if supported by the server)
---
--- @param command lsp.Command
--- @param cmd lsp.Command
--- @param context? {bufnr?: integer}
--- @param handler? lsp.Handler only called if a server command
function Client:exec_cmd(command, context, handler)
function Client:exec_cmd(cmd, context, handler)
context = vim.deepcopy(context or {}, true) --[[@as lsp.HandlerContext]]
context.bufnr = vim._resolve_bufnr(context.bufnr)
context.client_id = self.id
local cmdname = command.command
local cmdname = cmd.command
local fn = self.commands[cmdname] or lsp.commands[cmdname]
if fn then
fn(command, context)
fn(cmd, context)
return
end
@@ -1099,12 +1099,12 @@ function Client:exec_cmd(command, context, handler)
)
return
end
-- Not using command directly to exclude extra properties,
-- Not using cmd directly to exclude extra properties,
-- see https://github.com/python-lsp/python-lsp-server/issues/146
--- @type lsp.ExecuteCommandParams
local params = {
command = cmdname,
arguments = command.arguments,
arguments = cmd.arguments,
}
self:request('workspace/executeCommand', params, handler, context.bufnr)
end