Skip to content

Commit 56f486a

Browse files
committed
docs(#2934): use make lintdoc target directly
1 parent 4be6efc commit 56f486a

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

scripts/gen_vimdoc.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ Nvim source is required to run src/gen/gen_vimdoc.lua
2020
Please:
2121
mkdir -p src
2222
curl -L 'https://github.com/neovim/neovim/archive/refs/tags/stable.tar.gz' | tar zx --directory src
23-
NVIM_SRC=src/neovim-stable ${0}
23+
export NVIM_SRC=src/neovim-stable
2424
EOM
2525
exit 1
2626
fi
2727

28+
# unset to ensure no collisions with system installs etc.
29+
unset VIMRUNTIME
30+
2831
# runtime/doc is hardcoded, copy the help in
2932
mkdir -pv runtime/doc
3033
cp -v "doc/nvim-tree-lua.txt" runtime/doc

scripts/lintdoc.sh

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

3-
# Wrapper around nvim help linter lintdoc.lua, run as part of nvim's make lintdoc target.
3+
# Wrapper around Nvim help linter lintdoc.lua, run as part of Nvim's make lintdoc target.
44
#
5-
# Requires nvim to have been built.
5+
# Requires Nvim to have been built.
66
#
77
# Desired:
88
# - tags valid
@@ -24,19 +24,19 @@ Compiled Nvim source is required to run src/gen/gen_vimdoc.lua
2424
Please:
2525
mkdir -p src
2626
curl -L 'https://github.com/neovim/neovim/archive/refs/tags/stable.tar.gz' | tar zx --directory src
27-
NVIM_SRC=src/neovim-stable ${0}
27+
export NVIM_SRC=src/neovim-stable
2828
EOM
2929
exit 1
3030
fi
3131

32-
# runtime/doc in the nvim source is practically hardcoded, copy our help in
32+
# unset to ensure no collisions with system installs etc.
33+
unset VIMRUNTIME
34+
35+
# runtime/doc in the Nvim source is practically hardcoded, copy our help in
3336
cp -v "doc/nvim-tree-lua.txt" "${NVIM_SRC}/runtime/doc"
3437

35-
# run from within nvim source
38+
# run from within Nvim source
3639
cd "${NVIM_SRC}"
3740

38-
# make nvim
39-
make
40-
41-
# execute the lint
42-
VIMRUNTIME=runtime scripts/lintdoc.lua
41+
# make nvim and execute the lint
42+
make lintdoc

0 commit comments

Comments
 (0)