Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

HTML: validator

LCD 47 edited this page Jun 12, 2016 · 22 revisions

This file is no longer maintained

This file exists only as a historic reference. Documentation for syntastic checkers is now included in the manual, please see :help syntastic-checkers in Vim.


Maintainer: LCD 47 lcd047@gmail.com

Validator is a non-DTD-based HTML checker. See the project's page for details.

You can instruct syntastic to use the online service, or you can install vnu.jar and run it as a HTTP server:

$ java -Xss512k -cp /path/to/vnu.jar nu.validator.servlet.Main 8888

Requirement

This checker uses curl(1).

Checker options

g:syntastic_html_validator_api (string; default: 'http://validator.nu/')
URL of the service to use for checking; leave it to the default to run the checks against https://validator.nu/, or set it to http://localhost:8888/ if you have vnu.jar installed, and you're running it as a standalone HTTP server
g:syntastic_html_validator_parser (string; default: empty)
parser to use; legal values are: xml, xmldtd, html, html5, html4, html4tr; set it to html5 to check HTML5 files; see the wiki for reference
g:syntastic_html_validator_nsfilter (string; default: empty)
sets the nsfilter for the parser; see the wiki for details
g:syntastic_html_validator_exec (string; default: 'curl')
path to the curl executable; override it with a full path if your curl(1) is not installed in a standard location

Notes

Non-zero exit codes from curl are signaled by syntastic with messages such as:

syntastic: error: checker html/validator returned abnormal status 26

You can lookup the meaning of these codes in curl's manual.

This checker doesn't call the makeprgBuild() function, and thus it ignores the usual g:syntastic_html_validator_<option> variables. The only exception is g:syntastic_html_validator_exec, which can be used to override the path to the curl executable.

Clone this wiki locally