diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-08-24 23:35:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-24 20:35:19 -0700 |
| commit | 7b5253c863cea14c93e4cec7680342b3c4fc5414 (patch) | |
| tree | 81197e5a01dabc8f1c48b3c620563ff8cfa314d5 /.github | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar.gz nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar.bz2 nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar.lz nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar.xz nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.tar.zst nvim-lspconfig-7b5253c863cea14c93e4cec7680342b3c4fc5414.zip | |
ci(lint): require type annotation #4034
Diffstat (limited to '.github')
| -rw-r--r-- | .github/ci/lint.sh | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
