aboutsummaryrefslogtreecommitdiffstats
path: root/.github/ci
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-11-26 07:34:16 -0800
committerGitHub <noreply@github.com>2024-11-26 07:34:16 -0800
commit16008a64f6ab9309641f30b8a7c9a432f1649b9a (patch)
tree349e8a7678ba9f7579e25f3b7dd1386e344c267d /.github/ci
parentrefactor: remove implementation of util.path.dirname #3460 (diff)
downloadnvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar.gz
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar.bz2
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar.lz
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar.xz
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.tar.zst
nvim-lspconfig-16008a64f6ab9309641f30b8a7c9a432f1649b9a.zip
ci: check for deprecated util functions #3462
Diffstat (limited to '.github/ci')
-rw-r--r--.github/ci/run_sanitizer.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/.github/ci/run_sanitizer.sh b/.github/ci/run_sanitizer.sh
index 8630de3f..1f148ba2 100644
--- a/.github/ci/run_sanitizer.sh
+++ b/.github/ci/run_sanitizer.sh
@@ -5,12 +5,20 @@ REF_BRANCH="$1"
PR_BRANCH="$2"
# checks for added lines that contain search pattern and prints them
-SEARCH_PATTERN="(path\.dirname|fn\.cwd)"
+SEARCH_PATTERN='(path\.dirname|fn\.cwd)'
if git diff --pickaxe-all -U0 -G "${SEARCH_PATTERN}" "${REF_BRANCH}" "${PR_BRANCH}" -- '*.lua' | grep -Ev '(configs|utils)\.lua$' | grep -E "^\+.*${SEARCH_PATTERN}" ; then
echo
echo 'String "dirname" found. There is a high risk that this might contradict the directive:'
- echo '"Do not add vim.fn.cwd or util.path.dirname in root_dir".'
+ echo '"Do not use vim.fn.cwd or util.path.dirname in root_dir".'
echo "see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#adding-a-server-to-lspconfig."
exit 1
fi
+
+SEARCH_PATTERN='(util\.path\.dirname)'
+
+if git diff --pickaxe-all -U0 -G "${SEARCH_PATTERN}" "${REF_BRANCH}" "${PR_BRANCH}" -- '*.lua' | grep -Ev '\.lua$' | grep -E "^\+.*${SEARCH_PATTERN}" ; then
+ echo
+ echo 'Do not use deprecated util functions: '"${SEARCH_PATTERN}"
+ exit 1
+fi