diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index b89a42b4..b4e64ca2 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -2586,10 +2586,11 @@ The following checkers are available for HTML (filetype "html"): 1. ESLint...................|syntastic-html-eslint| 2. gjslint..................|syntastic-html-gjslint| 3. HTML tidy................|syntastic-html-tidy| - 4. JSHint...................|syntastic-html-jshint| - 5. textlint.................|syntastic-html-textlint| - 6. Validator................|syntastic-html-validator| - 7. W3.......................|syntastic-html-w3| + 4. HTMLHint.................|syntastic-html-htmlhint| + 5. JSHint...................|syntastic-html-jshint| + 6. textlint.................|syntastic-html-textlint| + 7. Validator................|syntastic-html-validator| + 8. W3.......................|syntastic-html-w3| ------------------------------------------------------------------------------ 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|. ------------------------------------------------------------------------------ -4. jshint *syntastic-html-jshint* +4. HTMLHint *syntastic-html-htmlhint* + +Name: HTMLHint +Maintainer: LCD 47 + +"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 Maintainer: LCD 47 @@ -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|. ------------------------------------------------------------------------------ -5. textlint *syntastic-html-textlint* +6. textlint *syntastic-html-textlint* Name: textlint Maintainer: LCD 47 @@ -2750,7 +2769,7 @@ work: See also: |syntastic-markdown-textlint|, |syntastic-text-textlint|. ------------------------------------------------------------------------------ -6. Validator *syntastic-html-validator* +7. Validator *syntastic-html-validator* Name: validator Maintainer: LCD 47 @@ -2823,7 +2842,7 @@ You can lookup the meaning of these codes in cURL's manual: http://curl.haxx.se/docs/manpage.html#EXIT ------------------------------------------------------------------------------ -7. W3 *syntastic-html-w3* +8. W3 *syntastic-html-w3* Name: w3 Maintainer: Martin Grenfell diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 1a426db0..f88c5ab2 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-232' +let g:_SYNTASTIC_VERSION = '3.7.0-233' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/html/htmlhint.vim b/syntax_checkers/html/htmlhint.vim new file mode 100644 index 00000000..3518b7ee --- /dev/null +++ b/syntax_checkers/html/htmlhint.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: html.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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: