lintdoc.lua 669 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env -S nvim -l
  2. -- Validate vimdoc files on $VIMRUNTIME/doc, and test generating HTML docs.
  3. -- Checks for duplicate/missing tags, parse errors, and invalid links/urls/spellings.
  4. -- See also `make lintdoc`.
  5. --
  6. -- Usage:
  7. -- $ nvim -l scripts/lintdoc.lua
  8. -- $ make lintdoc
  9. print('Running lintdoc ...')
  10. -- gen_help_html.lua requires helptags to be generated in $VIMRUNTIME/doc.
  11. -- :helptags also checks for duplicate tags.
  12. -- 🤢 Load netrw so its tags are generated by :helptags.
  13. vim.cmd [[ packadd netrw ]]
  14. vim.cmd [[ helptags ALL ]]
  15. require('src.gen.gen_help_html').run_validate()
  16. require('src.gen.gen_help_html').test_gen()
  17. print('lintdoc PASSED.')