New checker for HTML: htmlhint.
This commit is contained in:
parent
8b93210371
commit
1379530f03
@ -2586,10 +2586,11 @@ The following checkers are available for HTML (filetype "html"):
|
|||||||
1. ESLint...................|syntastic-html-eslint|
|
1. ESLint...................|syntastic-html-eslint|
|
||||||
2. gjslint..................|syntastic-html-gjslint|
|
2. gjslint..................|syntastic-html-gjslint|
|
||||||
3. HTML tidy................|syntastic-html-tidy|
|
3. HTML tidy................|syntastic-html-tidy|
|
||||||
4. JSHint...................|syntastic-html-jshint|
|
4. HTMLHint.................|syntastic-html-htmlhint|
|
||||||
5. textlint.................|syntastic-html-textlint|
|
5. JSHint...................|syntastic-html-jshint|
|
||||||
6. Validator................|syntastic-html-validator|
|
6. textlint.................|syntastic-html-textlint|
|
||||||
7. W3.......................|syntastic-html-w3|
|
7. Validator................|syntastic-html-validator|
|
||||||
|
8. W3.......................|syntastic-html-w3|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
1. ESLint *syntastic-html-eslint*
|
1. ESLint *syntastic-html-eslint*
|
||||||
@ -2679,7 +2680,25 @@ List of additional empty tags, to be added to "--new-empty-tags".
|
|||||||
See also: |syntastic-xhtml-tidy|.
|
See also: |syntastic-xhtml-tidy|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4. jshint *syntastic-html-jshint*
|
4. HTMLHint *syntastic-html-htmlhint*
|
||||||
|
|
||||||
|
Name: HTMLHint
|
||||||
|
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||||
|
|
||||||
|
"JSHint" is a static code analysis tool for HTML. See the project's page for
|
||||||
|
details:
|
||||||
|
|
||||||
|
http://htmlhint.com/
|
||||||
|
|
||||||
|
Syntastic requires "HTMLHint" version 0.9.13 or later.
|
||||||
|
|
||||||
|
Checker options~
|
||||||
|
|
||||||
|
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||||
|
accepts the standard options described at |syntastic-config-makeprg|.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
5. jshint *syntastic-html-jshint*
|
||||||
|
|
||||||
Name: JSHint
|
Name: JSHint
|
||||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||||
@ -2725,7 +2744,7 @@ in "JSHint". If that is undesirable, your only other option is to leave
|
|||||||
See also: |syntastic-javascript-jshint|, |syntastic-xhtml-jshint|.
|
See also: |syntastic-javascript-jshint|, |syntastic-xhtml-jshint|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
5. textlint *syntastic-html-textlint*
|
6. textlint *syntastic-html-textlint*
|
||||||
|
|
||||||
Name: textlint
|
Name: textlint
|
||||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||||
@ -2750,7 +2769,7 @@ work:
|
|||||||
See also: |syntastic-markdown-textlint|, |syntastic-text-textlint|.
|
See also: |syntastic-markdown-textlint|, |syntastic-text-textlint|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
6. Validator *syntastic-html-validator*
|
7. Validator *syntastic-html-validator*
|
||||||
|
|
||||||
Name: validator
|
Name: validator
|
||||||
Maintainer: LCD 47 <lcd047@gmail.com>
|
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||||
@ -2823,7 +2842,7 @@ You can lookup the meaning of these codes in cURL's manual:
|
|||||||
http://curl.haxx.se/docs/manpage.html#EXIT
|
http://curl.haxx.se/docs/manpage.html#EXIT
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
7. W3 *syntastic-html-w3*
|
8. W3 *syntastic-html-w3*
|
||||||
|
|
||||||
Name: w3
|
Name: w3
|
||||||
Maintainer: Martin Grenfell <martin.grenfell@gmail.com>
|
Maintainer: Martin Grenfell <martin.grenfell@gmail.com>
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:_SYNTASTIC_START
|
lockvar! g:_SYNTASTIC_START
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:_SYNTASTIC_VERSION = '3.7.0-232'
|
let g:_SYNTASTIC_VERSION = '3.7.0-233'
|
||||||
lockvar g:_SYNTASTIC_VERSION
|
lockvar g:_SYNTASTIC_VERSION
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
46
syntax_checkers/html/htmlhint.vim
Normal file
46
syntax_checkers/html/htmlhint.vim
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
"============================================================================
|
||||||
|
"File: html.vim
|
||||||
|
"Description: Syntax checking plugin for syntastic
|
||||||
|
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||||
|
"License: This program is free software. It comes without any warranty,
|
||||||
|
" to the extent permitted by applicable law. You can redistribute
|
||||||
|
" it and/or modify it under the terms of the Do What The Fuck You
|
||||||
|
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||||
|
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
"
|
||||||
|
"============================================================================
|
||||||
|
|
||||||
|
if exists('g:loaded_syntastic_html_htmlhint_checker')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_syntastic_html_htmlhint_checker = 1
|
||||||
|
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
function! SyntaxCheckers_html_htmlhint_IsAvailable() dict
|
||||||
|
if !executable(self.getExec())
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 9, 13])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SyntaxCheckers_html_htmlhint_GetLocList() dict
|
||||||
|
let makeprg = self.makeprgBuild({ 'args_before': '--format unix' })
|
||||||
|
|
||||||
|
let errorformat = '%f:%l:%c: %m'
|
||||||
|
|
||||||
|
return SyntasticMake({
|
||||||
|
\ 'makeprg': makeprg,
|
||||||
|
\ 'errorformat': errorformat,
|
||||||
|
\ 'returns': [0, 1] })
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
|
\ 'filetype': 'html',
|
||||||
|
\ 'name': 'htmlhint'})
|
||||||
|
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" vim: set sw=4 sts=4 et fdm=marker:
|
Loading…
x
Reference in New Issue
Block a user