aboutsummaryrefslogtreecommitdiffstats
path: root/.github/ci/lint.sh
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-26 06:01:04 -0700
committerGitHub <noreply@github.com>2025-04-26 06:01:04 -0700
commit85e09220a878b19e62eec98872db4c74f711d167 (patch)
tree84460d3ee438c5a168675f1a94949c6d8eae972c /.github/ci/lint.sh
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.gz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.bz2
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.lz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.xz
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.tar.zst
nvim-lspconfig-85e09220a878b19e62eec98872db4c74f711d167.zip
ci: check legacy configs, drop "comment" #3781
- Disallow adding new legacy configs. - Drop the "comment" CI job. It is over-engineered, and adds redundant comments on PRs.
Diffstat (limited to '.github/ci/lint.sh')
-rw-r--r--.github/ci/lint.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/ci/lint.sh b/.github/ci/lint.sh
index 39cb0d3a..4f4f49b5 100644
--- a/.github/ci/lint.sh
+++ b/.github/ci/lint.sh
@@ -8,6 +8,25 @@ set -e
REF_BRANCH="$1"
PR_BRANCH="$2"
+_fail() {
+ echo
+ printf "lint.sh: %s\n" "$@"
+ exit 1
+}
+
+_check_generated_docs() {
+ if ! git diff "${REF_BRANCH}"..."${PR_BRANCH}" --exit-code -- doc/configs.md doc/configs.txt; then
+ _fail '`configs.md` or `configs.txt` will be regenerated by the docgen CI process. Edit the Lua source file instead.' \
+ ' For details on generating documentation, see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs'
+ fi
+}
+
+_check_legacy_configs() {
+ if ! git diff "${REF_BRANCH}"..."${PR_BRANCH}" --exit-code -- lua/lspconfig/configs/ ; then
+ _fail 'Configs in `lua/lspconfig/configs/*` are deprecated. Add or update configs in `lsp/*` instead.'
+ fi
+}
+
# Enforce buffer-local commands.
_check_cmd_buflocal() {
if git grep -P 'nvim_create_user_command' -- 'lsp/*.lua' ; then
@@ -85,6 +104,8 @@ _check_deprecated_utils() {
fi
}
+_check_generated_docs
+_check_legacy_configs
_check_cmd_buflocal
_check_brief_placement
_check_lsp_cmd_prefix