mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	 34a2bfdcc5
			
		
	
	34a2bfdcc5
	
	
	
		
			
			Problem:
"make lintdoc" is not validating vimdoc (:help) tags.
Solution:
- Call `lang_tree:parse()` to init the parser.
- Load netrw 🤢 explicitly, since it was moved to `pack/dist/opt/`.
- Fix invalid help tags.
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			669 B
		
	
	
	
		
			Lua
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			669 B
		
	
	
	
		
			Lua
		
	
	
		
			Executable File
		
	
	
	
	
| #!/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.')
 |