From 7b5253c863cea14c93e4cec7680342b3c4fc5414 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 24 Aug 2025 23:35:19 -0400 Subject: ci(lint): require type annotation #4034 --- .github/ci/lint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.github') diff --git a/.github/ci/lint.sh b/.github/ci/lint.sh index d5a0eb2e..5b774f92 100644 --- a/.github/ci/lint.sh +++ b/.github/ci/lint.sh @@ -35,6 +35,14 @@ _check_brief_placement() { fi } +# Returned object should have `---@type vim.lsp.Config` annotation. +# TODO: use luals/emmylua type checking in CI: https://github.com/neovim/neovim/pull/33344 +_check_type() { + if git grep --files-without-match '\-\-\-\@type vim\.lsp\.Config' -- 'lsp/*.lua' ; then + _fail 'Missing `---@type vim.lsp.Config` annotation.' + fi +} + # Enforce "Lsp" prefix on all user commands. _check_lsp_cmd_prefix() { local exclude='tinymist' @@ -92,6 +100,7 @@ _check_legacy_configs() { _check_generated_docs _check_cmd_buflocal _check_brief_placement +_check_type _check_lsp_cmd_prefix _check_exec_cmd _check_deprecated_in_nvim_0_11 -- cgit v1.2.3-70-g09d2