Skip to content

Commit 5a1d08b

Browse files
authored
docs: remove lintdoc from help-check, skip the name checker during help-update (#3322)
* docs: remove lintdoc from help-check, skip the name checker during help-update * docs: test new help-check * Revert "docs: test new help-check" This reverts commit 5212837.
1 parent d277467 commit 5a1d08b

4 files changed

Lines changed: 17 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@ jobs:
9292
curl -L "https://github.com/neovim/neovim/archive/refs/tags/${{ matrix.nvim_version }}.tar.gz" | tar zx --directory "${DIR_NVIM_SRC}/.."
9393
cd "${DIR_NVIM_SRC}"
9494
make doc
95-
make lintdoc
9695
9796
- run: make help-check

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ make help-update
184184
- Generate config classes `*nvim-tree-config*`
185185
- Generate API `*nvim-tree-api*`
186186

187-
## Checking And Linting
187+
## Checking
188188

189189
This is run in CI. Commit or stage your changes and run:
190190

@@ -194,7 +194,6 @@ make help-check
194194

195195
- Re-runs `make help-update`
196196
- Checks that `git diff` is empty, to ensure that all content has been generated. This is why a stage or commit is necessary.
197-
- Lints `doc/nvim-tree-lua.txt` using `scripts/vimdoc.sh lintdoc` to check for no broken links etc.
198197

199198
# Windows
200199

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ help-update:
4545
# CI
4646
#
4747
help-check: help-update
48-
scripts/vimdoc.sh lintdoc
4948
git diff --exit-code doc/nvim-tree-lua.txt
5049

5150

scripts/vimdoc.sh

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
#!/usr/bin/env sh
22

3-
# Wrapper around Nvim make targets:
3+
# Wrapper around Nvim make doc target:
44
#
5-
# make doc - gen_vimdoc.lua
6-
# Generates doc/nvim-tree-lua.txt
7-
# Uses nvim-tree sources defined in scripts/vimdoc_config.lua
8-
# Shims above into src/gen/gen_vimdoc.lua, replacing Nvim's config.
9-
#
10-
# make lintdoc - lintdoc.lua
11-
# Validates doc/nvim-tree-lua.txt
12-
# Desired:
13-
# - tags valid
14-
# - links valid
15-
# Also:
16-
# - brand spelling, notably Nvim and Lua
5+
# Generates doc/nvim-tree-lua.txt
6+
# Uses nvim-tree sources defined in scripts/vimdoc_config.lua
7+
# Shims above into src/gen/gen_vimdoc.lua, replacing Nvim's config.
178
#
189
# There are some hardcoded expectations which we work around as commented.
1910

2011
set -e
2112

22-
if [ $# -ne 1 ] || [ "${1}" != "doc" ] && [ "${1}" != "lintdoc" ]; then
23-
echo "usage: ${0} <doc|lintdoc>" 1>&2
13+
if [ $# -ne 1 ] || [ "${1}" != "doc" ]; then
14+
echo "usage: ${0} <doc>" 1>&2
2415
exit 1
2516
fi
2617

@@ -38,7 +29,7 @@ fi
3829
if [ ! -d "${DIR_NVIM_SRC}" ]; then
3930
cat << EOM
4031
41-
Nvim source v0.11+ is required to run ${0}
32+
Nvim stable source is required to run ${0}
4233
4334
Unavailable: ${DIR_NVIM_SRC_DEF} or \$DIR_NVIM_SRC=${DIR_NVIM_SRC}
4435
@@ -84,7 +75,15 @@ if [ "${1}" = "doc" ]; then
8475

8576
# modify gen_vimdoc.lua to use our config, backing up original
8677
cp "${DIR_NVIM_SRC}/src/gen/gen_vimdoc.lua" "${DIR_NVIM_SRC}/src/gen/gen_vimdoc.lua.org"
87-
sed -i -E 's/spairs\(config\)/spairs\(require("gen.vimdoc_config")\)/g' "${DIR_NVIM_SRC}/src/gen/gen_vimdoc.lua"
78+
sed -i -E '
79+
80+
# use our config
81+
s/spairs\(config\)/spairs\(require("gen.vimdoc_config") --[[injected by nvim-tree]]\)/g ;
82+
83+
# remove the name linter
84+
s/(^run\(\)$)/\n--injected by nvim-tree\nlint.lint_names = function\(\)\nend\n\n\1 --/g
85+
86+
' "${DIR_NVIM_SRC}/src/gen/gen_vimdoc.lua"
8887

8988
# leave a generic placeholder to bridge between nvim.gen_vimdoc.Config
9089
echo "---@brief placeholder" > "${DIR_NVIM_SRC}/runtime/lua/placeholder.lua"

0 commit comments

Comments
 (0)