Merge branch 'master' into registry_refactor

This commit is contained in:
LCD 47 2014-02-23 09:01:30 +02:00
commit ab136c5ae9
6 changed files with 60 additions and 7 deletions

View File

@ -38,7 +38,7 @@ At the time of this writing, syntax checking plugins exist for ActionScript,
Ada, AppleScript, AsciiDoc, ASM, BEMHTML, Bourne shell, C, C++, C#, Chef, Ada, AppleScript, AsciiDoc, ASM, BEMHTML, Bourne shell, C, C++, C#, Chef,
CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust, Elixir, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust, Elixir,
Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell, Haxe, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell, Haxe,
Handlebars, HSS, HTML, Java, JavaScript, JSON, LESS, Lex, Limbo, LISP, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP,
LLVM intermediate language, Lua, MATLAB, NASM, Objective-C, Objective-C++, LLVM intermediate language, Lua, MATLAB, NASM, Objective-C, Objective-C++,
OCaml, Perl, Perl POD, PHP, gettext Portable Object, Puppet, Python, Racket, OCaml, Perl, Perl POD, PHP, gettext Portable Object, Puppet, Python, Racket,
reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig,

View File

@ -96,8 +96,8 @@ function! syntastic#log#debugShowOptions(level, names)
let vlist = type(a:names) == type("") ? [a:names] : a:names let vlist = type(a:names) == type("") ? [a:names] : a:names
if !empty(vlist) if !empty(vlist)
call map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))") let vals = map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
echomsg leader . join(vlist, ', ') echomsg leader . join(vals, ', ')
endif endif
call s:logRedirect(0) call s:logRedirect(0)
endfunction endfunction

View File

@ -101,7 +101,7 @@ function! syntastic#util#wideMsg(msg)
"width as the proper amount of characters "width as the proper amount of characters
let chunks = split(msg, "\t", 1) let chunks = split(msg, "\t", 1)
let msg = join(map(chunks[:-2], 'v:val . repeat(" ", &ts - s:width(v:val) % &ts)'), '') . chunks[-1] let msg = join(map(chunks[:-2], 'v:val . repeat(" ", &ts - s:width(v:val) % &ts)'), '') . chunks[-1]
let msg = strpart(msg, 0, winwidth(0) - 1) let msg = strpart(msg, 0, &columns - 1)
set noruler noshowcmd set noruler noshowcmd
call syntastic#util#redraw(0) call syntastic#util#redraw(0)

View File

@ -0,0 +1,51 @@
"============================================================================
"File: jsxhint.vim
"Description: Javascript syntax checker - using jsxhint
"Maintainer: Thomas Boyt <me@thomasboyt.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_javascript_jsxhint_checker')
finish
endif
let g:loaded_syntastic_javascript_jsxhint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
if !executable('jshint') || !syntastic#util#versionIsAtLeast(syntastic#util#getVersion('jshint --version'), [1, 1])
return 0
endif
let jsxhint_version = system(self.getExecEscaped() . ' --version')
return
\ v:shell_error == 0 &&
\ jsxhint_version =~# '\m^JSXHint\>' &&
\ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(jsxhint_version), [0, 4, 1])
endfunction
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '--verbose' })
let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr('')} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'javascript',
\ 'name': 'jsxhint'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@ -23,7 +23,8 @@ set cpo&vim
function! SyntaxCheckers_php_phpcs_GetLocList() dict function! SyntaxCheckers_php_phpcs_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args_after': '--report=csv --tab-width=' . &tabstop }) \ 'args': '--tab-width=' . &tabstop,
\ 'args_after': '--report=csv' })
let errorformat = let errorformat =
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'. \ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'.
@ -37,7 +38,7 @@ endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({ call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'php', \ 'filetype': 'php',
\ 'name': 'phpcs'}) \ 'name': 'phpcs' })
let &cpo = s:save_cpo let &cpo = s:save_cpo
unlet s:save_cpo unlet s:save_cpo

View File

@ -69,7 +69,8 @@ endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({ call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'yaml', \ 'filetype': 'yaml',
\ 'name': 'yamlxs' }) \ 'name': 'yamlxs',
\ 'exec': 'perl' })
let &cpo = s:save_cpo let &cpo = s:save_cpo
unlet s:save_cpo unlet s:save_cpo