Merge branch 'master' into registry_refactor
This commit is contained in:
commit
ab136c5ae9
@ -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,
|
||||
CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust, Elixir,
|
||||
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++,
|
||||
OCaml, Perl, Perl POD, PHP, gettext Portable Object, Puppet, Python, Racket,
|
||||
reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig,
|
||||
|
@ -96,8 +96,8 @@ function! syntastic#log#debugShowOptions(level, names)
|
||||
|
||||
let vlist = type(a:names) == type("") ? [a:names] : a:names
|
||||
if !empty(vlist)
|
||||
call map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
|
||||
echomsg leader . join(vlist, ', ')
|
||||
let vals = map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
|
||||
echomsg leader . join(vals, ', ')
|
||||
endif
|
||||
call s:logRedirect(0)
|
||||
endfunction
|
||||
|
@ -101,7 +101,7 @@ function! syntastic#util#wideMsg(msg)
|
||||
"width as the proper amount of characters
|
||||
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 = strpart(msg, 0, winwidth(0) - 1)
|
||||
let msg = strpart(msg, 0, &columns - 1)
|
||||
|
||||
set noruler noshowcmd
|
||||
call syntastic#util#redraw(0)
|
||||
|
51
syntax_checkers/javascript/jsxhint.vim
Normal file
51
syntax_checkers/javascript/jsxhint.vim
Normal 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:
|
@ -23,7 +23,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_php_phpcs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': '--report=csv --tab-width=' . &tabstop })
|
||||
\ 'args': '--tab-width=' . &tabstop,
|
||||
\ 'args_after': '--report=csv' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'.
|
||||
@ -37,7 +38,7 @@ endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'php',
|
||||
\ 'name': 'phpcs'})
|
||||
\ 'name': 'phpcs' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -69,7 +69,8 @@ endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'yaml',
|
||||
\ 'name': 'yamlxs' })
|
||||
\ 'name': 'yamlxs',
|
||||
\ 'exec': 'perl' })
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
Loading…
x
Reference in New Issue
Block a user