From f6ec8a411a89478c7683b35b80afd57d760119bb Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 22 Jan 2019 15:06:50 +0200 Subject: [PATCH] Checker html/validator can be used for xhtml and svg. --- doc/syntastic-checkers.txt | 198 +++++++++++++++++++++++++++++ plugin/syntastic.vim | 2 +- plugin/syntastic/registry.vim | 1 + syntax_checkers/html/validator.vim | 58 ++++++--- 4 files changed, 241 insertions(+), 18 deletions(-) diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index b2c347ba..9f9d8b0f 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -107,6 +107,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang* Solidity.................................|syntastic-checkers-solidity| SQL......................................|syntastic-checkers-sql| Stylus...................................|syntastic-checkers-stylus| + SVG......................................|syntastic-checkers-svg| Tcl......................................|syntastic-checkers-tcl| TeX......................................|syntastic-checkers-tex| @@ -3132,6 +3133,13 @@ Sets the "nsfilter" for the parser. See: https://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#nsfilter + *'g:syntastic_html_validator_schema'* +Type: string +Default: empty +Sets the "schema" for the parser. See: + + https://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#schema + *'g:syntastic_html_validator_exec'* Type: string Default: "curl" @@ -3153,6 +3161,8 @@ You can lookup the meaning of these codes in cURL's manual: http://curl.haxx.se/docs/manpage.html#EXIT +See also: |syntastic-svg-validator|, |syntastic-xhtml-validator|. + ------------------------------------------------------------------------------ 10. W3 *syntastic-html-w3* @@ -6563,6 +6573,103 @@ You might also find useful the "vim-stylus" plugin: https://github.com/wavded/vim-stylus +============================================================================== +SYNTAX CHECKERS FOR SVG *syntastic-checkers-svg* + +The following checkers are available for SVG (filetype "svg"): + + 1. Validator................|syntastic-svg-validator| + +------------------------------------------------------------------------------ +1. Validator *syntastic-svg-validator* + +Name: validator +Maintainer: LCD 47 + +"Validator" is a non-DTD-based HTML linter. See the project's page for +details: + + http://validator.github.io/validator/ + +As a syntastic linter, you can validate your files against the online service +(see https://validator.nu/), or you can install "vnu.jar": + + https://github.com/validator/validator/releases/latest + +then run it as a HTTP server: > + $ java -Xss512k -cp /path/to/vnu.jar nu.validator.servlet.Main 8888 +< +Requirement~ + +This checker uses cURL: + + http://curl.haxx.se/ + +Checker options~ + + *'g:syntastic_svg_validator_api'* +Type: 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. See: + + http://validator.github.io/validator/#standalone + + *'g:syntastic_svg_validator_parser'* +Type: string +Default: empty +Parser to use. Legal values are: "xml", "xmldtd", "html", "html5", "html4", +and "html4tr". References: + + https://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#parser + + *'g:syntastic_svg_validator_nsfilter'* +Type: string +Default: empty +Sets the "nsfilter" for the parser. See: + + https://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#nsfilter + + *'g:syntastic_svg_validator_schema'* +Type: string +Default: empty +Sets the "schema" for the parser. See: + + https://wiki.whatwg.org/wiki/Validator.nu_Common_Input_Parameters#schema + + *'g:syntastic_svg_validator_exec'* +Type: string +Default: "curl" +Path to the "cURL" executable. Override it with a full path if your "cURL" is +not installed in a standard location. + +This checker doesn't call the "makeprgBuild()" function, and thus it ignores +the usual 'g:syntastic_svg_validator_