2024-01-28 17:22:39 -05:00
|
|
|
#!/usr/bin/env -S nvim -l
|
|
|
|
|
|
|
|
|
|
-- Validate vimdoc files on $VIMRUNTIME/doc, and test generating HTML docs.
|
|
|
|
|
-- Checks for duplicate/missing tags, parse errors, and invalid links/urls/spellings.
|
|
|
|
|
-- See also `make lintdoc`.
|
|
|
|
|
--
|
|
|
|
|
-- Usage:
|
|
|
|
|
-- $ nvim -l scripts/lintdoc.lua
|
|
|
|
|
-- $ make lintdoc
|
|
|
|
|
|
|
|
|
|
print('Running lintdoc ...')
|
|
|
|
|
|
2025-03-09 10:27:28 -07:00
|
|
|
-- gen_help_html.lua requires helptags to be generated in $VIMRUNTIME/doc.
|
|
|
|
|
-- :helptags also checks for duplicate tags.
|
|
|
|
|
-- 🤢 Load netrw so its tags are generated by :helptags.
|
|
|
|
|
vim.cmd [[ packadd netrw ]]
|
2024-01-28 17:22:39 -05:00
|
|
|
vim.cmd [[ helptags ALL ]]
|
|
|
|
|
|
2025-11-18 21:35:22 +01:00
|
|
|
require('src.gen.gen_help_html').run_validate(nil, _G.arg[1] ~= nil)
|
2025-02-26 11:38:07 +00:00
|
|
|
require('src.gen.gen_help_html').test_gen()
|
2024-01-28 17:22:39 -05:00
|
|
|
|
|
|
|
|
print('lintdoc PASSED.')
|