HTMLLintはどうも更新する気なさそうなので、W3C Markup Validation Serviceを使うように戻すかと思いつつもインターフェイスがアレだなーと。で、Validator.nuの方を眺めてたら普通にGNU ErrorフォーマットやJSON、プレーンテキストでの結果を返す機能があったのでVimから簡単に使えるようにスクリプトを書いてしばらく使ってみる。
Download: nu-validator.pl and nu-validator.vim
nu-validator.plをパスが通ったディレクトリに置いて、nu-validator.vimを~/.vim/compiler/に置く。最後に~/.vimrcに
augroup NuValidator
autocmd!
autocmd FileType html compiler nu-validator
augroup END
と書けばHTMLファイルでmakeするとValidatorにかけられるようになる。消えたりしなさそうという理由でAPIのエンドポイントにW3Cがホスティングしている方を使ってるので、気になる人は本家のURLに書き換えると良い。
style-guide.html|615 col 143| Bad value “cc:attributionURL” for attribute “rel” on element “a”: Keyword “cc:attributionurl” is not registered. style-guide.html|617 col 49| Bad value “cc:useGuidelines” for attribute “rel” on element “a”: Keyword “cc:useguidelines” is not registered.
デスヨネ。