aboutsummaryrefslogtreecommitdiffstats
path: root/.github/ci
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-21 13:43:00 -0700
committerGitHub <noreply@github.com>2025-04-21 13:43:00 -0700
commit44ba712bc3015cce9b599d18f947d85a630e512b (patch)
treeae71e900e2c0c8f34bca009c4ec1f3e0d3d21051 /.github/ci
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar.gz
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar.bz2
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar.lz
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar.xz
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.tar.zst
nvim-lspconfig-44ba712bc3015cce9b599d18f947d85a630e512b.zip
ci(lint): use client:exec_cmd() #3755
Use `client:exec_cmd()` instead of calling `request("workspace/executeCommand")` directly.
Diffstat (limited to '.github/ci')
-rw-r--r--.github/ci/lint.sh (renamed from .github/ci/run_sanitizer.sh)12
1 files changed, 11 insertions, 1 deletions
diff --git a/.github/ci/run_sanitizer.sh b/.github/ci/lint.sh
index 6f1577da..38ea57eb 100644
--- a/.github/ci/run_sanitizer.sh
+++ b/.github/ci/lint.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# USAGE: To run locally:
-# bash .github/ci/run_sanitizer.sh origin/master HEAD
+# bash .github/ci/lint.sh origin/master HEAD
set -e
@@ -27,6 +27,15 @@ _check_lsp_cmd_prefix() {
fi
}
+# Enforce client:exec_cmd().
+_check_exec_cmd() {
+ if git grep -P 'workspace.executeCommand' -- 'lsp/*.lua' ; then
+ echo
+ echo 'Use client:exec_cmd() instead of calling request("workspace/executeCommand") directly. Example: lsp/pyright.lua'
+ exit 1
+ fi
+}
+
_check_deprecated_utils() {
# checks for added lines that contain search pattern and prints them
SEARCH_PATTERN='(path\.dirname|fn\.cwd)'
@@ -50,4 +59,5 @@ _check_deprecated_utils() {
_check_cmd_buflocal
_check_lsp_cmd_prefix
+_check_exec_cmd
_check_deprecated_utils