aboutsummaryrefslogtreecommitdiff
path: root/src/gen/gen_help_html.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-10-27 17:07:25 -0400
committerGitHub <noreply@github.com>2025-10-27 14:07:25 -0700
commite69beb9b1abae06df8778af7105ccfa739716dbd (patch)
tree5b07c1b73060e4062635d4442fa494a96f81ebc8 /src/gen/gen_help_html.lua
parent99506c1755405301da187b4d7ee75a4a1c2ad0e1 (diff)
downloadrneovim-e69beb9b1abae06df8778af7105ccfa739716dbd.tar.gz
rneovim-e69beb9b1abae06df8778af7105ccfa739716dbd.tar.bz2
rneovim-e69beb9b1abae06df8778af7105ccfa739716dbd.zip
fix(build): invalid help tags cause reports to fail #36356
Problem: The doc/ repo CI is failing https://github.com/neovim/doc/actions/runs/18830779387/job/53721736276 : invalid tags: { ["g:netrw_keepdir"] = "usr_22.txt", netrw = "vi_diff.txt", ["netrw-P"] = "usr_22.txt", ... ["netrw-v"] = "usr_22.txt", plugins = "editorconfig" } Solution: Add the "generate netrw tags" hack to the `gen()` step. Previously it was only in the `validate()` step. (idk why it only started failing 3 days ago...)
Diffstat (limited to 'src/gen/gen_help_html.lua')
-rw-r--r--src/gen/gen_help_html.lua17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gen/gen_help_html.lua b/src/gen/gen_help_html.lua
index 9e7ef43058..19023556a0 100644
--- a/src/gen/gen_help_html.lua
+++ b/src/gen/gen_help_html.lua
@@ -738,7 +738,7 @@ local function get_helpfiles(dir, include)
end
--- Populates the helptags map.
-local function get_helptags(help_dir)
+local function _get_helptags(help_dir)
local m = {}
-- Load a random help file to convince taglist() to do its job.
vim.cmd(string.format('split %s/api.txt', help_dir))
@@ -749,6 +749,18 @@ local function get_helptags(help_dir)
end
end
vim.cmd('q!')
+
+ return m
+end
+
+--- Populates the helptags map.
+local function get_helptags(help_dir)
+ local m = _get_helptags(help_dir)
+
+ --- XXX: Append tags from netrw, until we remove it...
+ local netrwtags = _get_helptags(vim.fs.normalize('$VIMRUNTIME/pack/dist/opt/netrw/doc/'))
+ m = vim.tbl_extend('keep', m, netrwtags)
+
return m
end
@@ -1481,9 +1493,6 @@ function M.validate(help_dir, include, parser_path)
local files_to_errors = {} ---@type table<string, string[]>
ensure_runtimepath()
tagmap = get_helptags(vim.fs.normalize(help_dir))
- --- XXX: Append tags from netrw, until we remove it...
- local netrwtags = get_helptags(vim.fs.normalize('$VIMRUNTIME/pack/dist/opt/netrw/doc/'))
- tagmap = vim.tbl_extend('keep', tagmap, netrwtags)
helpfiles = get_helpfiles(help_dir, include)
parser_path = parser_path and vim.fs.normalize(parser_path) or nil