aboutsummaryrefslogtreecommitdiff
path: root/scripts/lintdoc.lua
blob: d246c511761af3e5d62c3ef2e4ec651855b886d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 ...')

-- 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 ]]
vim.cmd [[ helptags ALL ]]

require('src.gen.gen_help_html').run_validate()
require('src.gen.gen_help_html').test_gen()

print('lintdoc PASSED.')