syntastic git · master
syntastic vim plugin (fork)
Vim Script 99%git clone https://git.christianimmanuel.de/mirrors-forks/syntastic.gitwget https://git.christianimmanuel.de/mirrors-forks/syntastic/archive/syntastic.tar.gzChecker html/w3: cleanup.
doc/syntastic-checkers.txt | 15 +++++++-------- plugin/syntastic.vim | 2 +- syntax_checkers/html/w3.vim | 41 ++++++++++++++++------------------------- 3 files changed, 24 insertions(+), 34 deletions(-) diff --cc doc/syntastic-checkers.txt index c983cee3,cb897e17..7453201e --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@@ -3197,7 -3197,7 +3197,7 @@@ run the checks against "https://validat *'g:syntastic_html_w3_doctype'* Type: string --Default: "" ++Default: "HTML5" Name of the document type definition to use for checking. If unspecified, the type is detected from the file content. Currently supported values for HTML: @@@ -6727,10 -6727,10 +6727,9 @@@ run the checks against "https://validat *'g:syntastic_svg_w3_doctype'* Type: string --Default: "SVG 1.1" (if not detected from DTD) --Name of the document type definition to use for checking. If unspecified, the --type is detected from a Document Type Declaration, if present, or "SVG 1.1" is --used. Currently supported values for SVG: ++Default: "SVG 1.1" ++Name of the document type definition to use for checking. Currently supported ++values for SVG: - SVG 1.0 - SVG 1.1 @@@ -7798,7 -7798,7 +7797,7 @@@ run the checks against "https://validat *'g:syntastic_xhtml_w3_doctype'* Type: string --Default: "" ++Default: "XHTML 1.1" Name of the document type definition to use for checking. If unspecified, the type is detected from the file content. Currently supported values for XHTML: diff --cc plugin/syntastic.vim index 5fe99770,5fe99770..b1980c5b --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@@ -19,7 -19,7 +19,7 @@@ if has('reltime' lockvar! g:_SYNTASTIC_START endif --let g:_SYNTASTIC_VERSION = '3.9.0-25' ++let g:_SYNTASTIC_VERSION = '3.9.0-29' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --cc syntax_checkers/html/w3.vim index 1d9f8d9e,1d9f8d9e..efe898df --- a/syntax_checkers/html/w3.vim +++ b/syntax_checkers/html/w3.vim @@@ -21,43 -21,43 +21,35 @@@ set cpo&vi " Constants {{{1 let s:DEFAULTS = { -- \ 'api': 'https://validator.w3.org/check', -- \ 'doctype': '' } -- --let s:CONTENT_TYPE = { -- \ 'html': 'text/html', -- \ 'svg': 'image/svg+xml', -- \ 'xhtml': 'application/xhtml+xml' } ++ \ 'html': { ++ \ 'ctype': 'text/html', ++ \ 'doctype': 'HTML5' }, ++ \ 'svg': { ++ \ 'ctype': 'image/svg+xml', ++ \ 'doctype': 'SVG 1.1' }, ++ \ 'xhtml': { ++ \ 'ctype': 'application/xhtml+xml', ++ \ 'doctype': 'XHTML 1.1' } } " }}}1 --" @vimlint(EVL101, 1, l:api) ++" @vimlint(EVL101, 1, l:ctype) " @vimlint(EVL101, 1, l:doctype) --" @vimlint(EVL104, 1, l:doctype) function! SyntaxCheckers_html_w3_GetLocList() dict " {{{1 let buf = bufnr('') let type = self.getFiletype() let fname = syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) -- -- for key in keys(s:DEFAULTS) -- let l:{key} = syntastic#util#var(type . '_w3_' . key, get(s:DEFAULTS, key)) ++ let api = syntastic#util#var(type . '_w3_api', 'https://validator.w3.org/check') ++. ++ for key in keys(s:DEFAULTS[type]) ++ let l:{key} = syntastic#util#var(type . '_w3_' . key, get(s:DEFAULTS[type], key)) endfor -- let ctype = get(s:CONTENT_TYPE, type, '') -- -- " SVG is detected as generic XML if doctype is unspecified. -- " Default "SVG 1.1" with "Only if missing" (fbd=1) to use DTD if present. -- let fbd = '' -- if type ==# 'svg' && doctype ==# '' -- let doctype = 'SVG 1.1' -- let fbd = '1' -- endif " vint: -ProhibitUsingUndeclaredVariable let makeprg = self.getExecEscaped() . ' -q -L -s --compressed -F output=json' . \ (doctype !=# '' ? ' -F doctype=' . syntastic#util#shescape(doctype) : '') . -- \ (fbd !=# '' ? ' -F fbd=' . fbd : '') . \ ' -F uploaded_file=@' . fname . -- \ (ctype !=# '' ? '\;type=' . ctype : '') . ++ \ '\;type=' . ctype . \ '\;filename=' . fname . \ ' ' . api " vint: ProhibitUsingUndeclaredVariable @@@ -86,8 -86,8 +78,7 @@@ return loclist endfunction " }}}1 " @vimlint(EVL104, 0, l:doctype) --" @vimlint(EVL101, 0, l:doctype) --" @vimlint(EVL101, 0, l:api) ++" @vimlint(EVL101, 0, l:ctype) call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'html',