Updated Plugins

This commit is contained in:
2017-11-27 07:43:28 -06:00
parent 7a949f2e81
commit e3041ba469
210 changed files with 3438 additions and 738 deletions

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: ada.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Alfredo Di Napoli <alfredo.dinapoli@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law.

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: ansible_lint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Erik Zaadi <erik.zaadi 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: drafter.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"==============================================================================
" FileName: applescript.vim
" Desc: Syntax checking plugin for syntastic.vim
" Desc: Syntax checking plugin for syntastic
" Author: Zhao Cai
" Email: caizhaoff@gmail.com
" Version: 0.2.1

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: asciidoc.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -34,19 +34,20 @@ function! SyntaxCheckers_asm_gcc_IsAvailable() dict " {{{1
endfunction " }}}1
function! SyntaxCheckers_asm_gcc_GetLocList() dict " {{{1
let buf = bufnr('')
return syntastic#c#GetLocList('asm', 'gcc', {
\ 'errorformat':
\ '%-G%f:%s:,' .
\ '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%f:%l: %m',
\ 'main_flags': '-x assembler -fsyntax-only' . (g:syntastic_asm_generic ? '' : ' -masm=' . s:GetDialect()) })
\ 'main_flags': '-x assembler -fsyntax-only' . (g:syntastic_asm_generic ? '' : ' -masm=' . s:GetDialect(buf)) })
endfunction " }}}1
" Utilities {{{1
function! s:GetDialect() " {{{2
return syntastic#util#var('asm_dialect', expand('%:e', 1) ==? 'asm' ? 'intel' : 'att')
function! s:GetDialect(buf) " {{{2
return syntastic#util#bufVar(a:buf, 'asm_dialect', fnamemodify(bufname(a:buf), ':e') ==? 'asm' ? 'intel' : 'att')
endfunction " }}}2
" }}}1

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: bemhtmllint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Sergej Tatarincev <s.tatarincev at yandex.ua>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: bro.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Justin Azoff <justin.azoff@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: checkpatch.vim
"Description: Syntax checking plugin for syntastic.vim using checkpatch.pl
"Description: Syntax checking plugin for syntastic using checkpatch.pl
"Maintainer: Daniel Walker <dwalker at fifo99 dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: clang_check.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: clang_tidy.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cppcheck.vim
"Description: Syntax checking plugin for syntastic.vim using cppcheck.pl
"Description: Syntax checking plugin for syntastic using cppcheck.pl
"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

View File

@@ -0,0 +1,40 @@
"============================================================================
"File: cppclean.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_c_cppclean_checker')
finish
endif
let g:loaded_syntastic_c_cppclean_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_c_cppclean_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'c',
\ 'name': 'cppclean' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -0,0 +1,61 @@
"============================================================================
"File: flawfinder.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_c_flawfinder_checker')
finish
endif
let g:loaded_syntastic_c_flawfinder_checker = 1
if !exists('g:syntastic_c_flawfinder_sort')
let g:syntastic_c_flawfinder_sort = 1
endif
if !exists('g:syntastic_c_flawfinder_thres')
let g:syntastic_c_flawfinder_thres = 3
endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_c_flawfinder_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m^(\S\+)\s\+\zs\S\+\ze:')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_c_flawfinder_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '--columns --dataonly --singleline --quiet' })
let errorformat = '%f:%l:%c: [%n] %m'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0] })
for e in loclist
let e['type'] = e['nr'] < g:syntastic_{self.getFiletype()}_flawfinder_thres ? 'W' : 'E'
let e['nr'] = 0
endfor
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'c',
\ 'name': 'flawfinder' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: c.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: make.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: oclint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: "UnCO" Lin <undercooled aT lavabit com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: pc_lint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Steve Bragg <steve at empresseffects dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
@@ -23,7 +23,8 @@ if !exists('g:syntastic_pc_lint_config_file')
endif
function! SyntaxCheckers_c_pc_lint_GetLocList() dict
let config = syntastic#util#findFileInParent(g:syntastic_pc_lint_config_file, expand('%:p:h', 1))
let buf = bufnr('')
let config = syntastic#util#findFileInParent(g:syntastic_pc_lint_config_file, fnamemodify(bufname(buf), ':p:h'))
call self.log('config =', config)
" -hFs1 - show filename, add space after messages, try to make message 1 line

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: sparse.vim
"Description: Syntax checking plugin for syntastic.vim using sparse.pl
"Description: Syntax checking plugin for syntastic using sparse.pl
"Maintainer: Daniel Walker <dwalker at fifo99 dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: splint.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -31,6 +31,7 @@ function! SyntaxCheckers_cabal_cabal_GetHighlightRegex(item)
endfunction
function! SyntaxCheckers_cabal_cabal_GetLocList() dict
let buf = bufnr('')
let makeprg = self.getExecEscaped() . ' check'
let errorformat =
@@ -40,9 +41,9 @@ function! SyntaxCheckers_cabal_cabal_GetLocList() dict
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h', 1),
\ 'cwd': fnamemodify(bufname(buf), ':p:h'),
\ 'preprocess': 'cabal',
\ 'defaults': {'bufnr': bufnr('')} })
\ 'defaults': {'bufnr': buf} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: foodcritic.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Doug Ireton <dougireton@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -0,0 +1,40 @@
"============================================================================
"File: cmakelint.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_cmake_cmakelint_checker')
finish
endif
let g:loaded_syntastic_cmake_cmakelint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_cmake_cmakelint_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'cmake',
\ 'name': 'cmakelint' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: co.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Andrew Kelley <superjoe30@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cobc.vim
"Description: Syntax checking plugin for syntastic.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
@@ -33,7 +33,7 @@ endfunction
function! SyntaxCheckers_cobol_cobc_GetLocList() dict
return syntastic#c#GetLocList('cobol', 'cobc', {
\ 'errorformat': '%f:%l: %trror: %m',
\ 'errorformat': '%f:%\s%#%l: %trror: %m',
\ 'main_flags': '-fsyntax-only' })
endfunction

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: coffee.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Lincoln Stoll <l@lds.li>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -0,0 +1,44 @@
"============================================================================
"File: coffee_jshint.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: John Krauss <john@johnkrauss.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_coffee_coffee_jshint_checker')
finish
endif
let g:loaded_syntastic_coffee_coffee_jshint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_coffee_coffee_jshint_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat =
\ '%Q-%\{32\,},' .
\ '%E%l:%c: %m,' .
\ '%P%f'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'coffee',
\ 'exec': 'coffee-jshint',
\ 'name': 'coffee_jshint' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: coffeelint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Lincoln Stoll <l@lds.li>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: coqtop.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Matvey Aksenov <matvey.aksenov 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: clang_check.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: clang_tidy.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cppcheck.vim
"Description: Syntax checking plugin for syntastic.vim using cppcheck.pl
"Description: Syntax checking plugin for syntastic using cppcheck.pl
"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

View File

@@ -0,0 +1,22 @@
"============================================================================
"File: cppclean.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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_cpp_cppclean_checker')
finish
endif
let g:loaded_syntastic_cpp_cppclean_checker = 1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'cpp',
\ 'name': 'cppclean',
\ 'redirect': 'c/cppclean'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cpplint.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -0,0 +1,26 @@
"============================================================================
"File: flawfinder.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Benjamin Bannier <bbannier 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_cpp_flawfinder_checker')
finish
endif
let g:loaded_syntastic_cpp_flawfinder_checker = 1
if !exists('g:syntastic_cpp_flawfinder_thres')
let g:syntastic_cpp_flawfinder_thres = 3
endif
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'cpp',
\ 'name': 'flawfinder',
\ 'redirect': 'c/flawfinder'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cpp.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: oclint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: "UnCO" Lin <undercooled aT lavabit com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: pc_lint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Steve Bragg <steve at empresseffects dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: verapp.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Lucas Verney <phyks@phyks.me>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cs.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Daniel Walker <dwalker@fifo99.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: css.vim
"Description: Syntax checking plugin for syntastic.vim using `csslint` CLI tool (http://csslint.net).
"Description: Syntax checking plugin for syntastic using `csslint` CLI tool (http://csslint.net).
"Maintainer: Ory Band <oryband 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
@@ -33,6 +33,7 @@ function! SyntaxCheckers_css_csslint_GetLocList() dict
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'postprocess': ['guards'],
\ 'defaults': {'bufnr': bufnr('')} })
endfunction

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: phpcs.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: prettycss.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: recess.vim
"Description: Syntax checking plugin for syntastic.vim using `recess`
"Description: Syntax checking plugin for syntastic using `recess`
" (http://twitter.github.io/recess/).
"Maintainer: Tim Carry <tim at pixelastic dot com>
"License: This program is free software. It comes without any warranty,

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: stylelint.vim
"Description: Syntax checking plugin for syntastic.vim using `stylelint`
"Description: Syntax checking plugin for syntastic using `stylelint`
" (https://github.com/stylelint/stylelint).
"Maintainer: Tim Carry <tim at pixelastic dot com>
"License: This program is free software. It comes without any warranty,
@@ -21,6 +21,8 @@ set cpo&vim
let s:args_after = {
\ 'css': '-f json',
\ 'html': '-f json',
\ 'less': '-f json -s less',
\ 'scss': '-f json -s scss' }
function! SyntaxCheckers_css_stylelint_GetLocList() dict

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: cucumber.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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

View File

@@ -18,7 +18,8 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
let arch_flag = syntastic#util#var('cuda_arch')
let buf = bufnr('')
let arch_flag = syntastic#util#bufVar(buf, 'cuda_arch')
if arch_flag !=# ''
let arch_flag = '-arch=' . arch_flag
call syntastic#log#oneTimeWarn('variable g:syntastic_cuda_arch is deprecated, ' .
@@ -27,9 +28,9 @@ function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
let build_opts = {}
let dummy = ''
if index(['h', 'hpp', 'cuh'], expand('%:e', 1), 0, 1) >= 0
if syntastic#util#var('cuda_check_header', 0)
let dummy = expand('%:p:h', 1) . syntastic#util#Slash() . '.syntastic_dummy.cu'
if index(['h', 'hpp', 'cuh'], fnamemodify(bufname(buf), ':e'), 0, 1) >= 0
if syntastic#util#bufVar(buf, 'cuda_check_header', 0)
let dummy = fnamemodify(bufname(buf), ':p:h') . syntastic#util#Slash() . '.syntastic_dummy.cu'
let build_opts = {
\ 'exe_before': 'echo > ' . syntastic#util#shescape(dummy) . ' ;',
\ 'fname_before': '.syntastic_dummy.cu -include' }
@@ -62,7 +63,18 @@ function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
\ '%DMaking %*\a in %f,'.
\ '%f|%l| %m'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'type': 'E'} })
for e in loclist
let pat = matchstr(e['text'], '\m\c^\s*warning:\s*\zs.*')
if pat !=# ''
let e['text'] = pat
let e['type'] = 'W'
endif
endfor
if dummy !=# ''
call delete(dummy)

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: d.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Alfredo Di Napoli <alfredo dot dinapoli at gmail dot com>
"License: Based on the original work of Gregor Uhlenheuer and his
" cpp.vim checker so credits are dued.
@@ -44,8 +44,9 @@ function! SyntaxCheckers_d_dmd_IsAvailable() dict " {{{1
endfunction " }}}1
function! SyntaxCheckers_d_dmd_GetLocList() dict " {{{1
let buf = bufnr('')
if !exists('g:syntastic_d_include_dirs')
let g:syntastic_d_include_dirs = s:GetIncludes(self, expand('%:p:h'))
let g:syntastic_d_include_dirs = s:GetIncludes(self, fnamemodify(bufname(buf), ':p:h'))
endif
return syntastic#c#GetLocList('d', 'dmd', {

View File

@@ -0,0 +1,48 @@
"============================================================================
"File: dscanner.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: ANtlord
"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_d_dscanner_checker')
finish
endif
let g:loaded_syntastic_d_dscanner_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_d_dscanner_GetHighlightRegex(i)
let term = matchstr(a:i['text'], '\m^.\{-}''\zs\S\+\ze''')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_d_dscanner_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args_after': '--report',
\ 'tail': '2>' . syntastic#util#DevNull() })
let errorformat = '%f:%l:%c:%m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'preprocess': 'dscanner',
\ 'subtype': 'Style',
\ 'returns': [0] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'd',
\ 'name': 'dscanner' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -30,7 +30,10 @@ function! SyntaxCheckers_dart_dartanalyzer_GetHighlightRegex(error)
endfunction
function! SyntaxCheckers_dart_dartanalyzer_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_after': '--machine' })
if !exists('s:format_machine')
let s:format_machine = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 23]) ? '--format=machine' : '--machine'
endif
let makeprg = self.makeprgBuild({ 'args_after': s:format_machine })
" Machine readable format looks like:
" SEVERITY|TYPE|ERROR_CODE|FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: igor.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: docbk.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: dockerfile_lint.vim
"Description: Syntax checking plugin for syntastic.vim using dockerfile-lint
"Description: Syntax checking plugin for syntastic using dockerfile-lint
" (https://github.com/projectatomic/dockerfile_lint).
"Maintainer: Tim Carry <tim at pixelastic dot com>
"License: This program is free software. It comes without any warranty,

View File

@@ -0,0 +1,41 @@
"============================================================================
"File: hadolint.vim
"Description: Dockerfile linter written in Haskell
" (http://hadolint.lukasmartinelli.ch/).
"Maintainer: Jesper B. Rosenkilde <jbr at humppa dot dk>
"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_dockerfile_hadolint_checker')
finish
endif
let g:loaded_syntastic_dockerfile_hadolint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_dockerfile_hadolint_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%W%f:%l %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'dockerfile',
\ 'name': 'hadolint'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: elixir.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Richard Ramsden <rramsden 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
@@ -27,9 +27,10 @@ function! SyntaxCheckers_elixir_elixir_IsAvailable() dict
endfunction
function! SyntaxCheckers_elixir_elixir_GetLocList() dict
let buf = bufnr('')
let make_options = {}
let compile_command = 'elixir'
let mix_file = syntastic#util#findFileInParent('mix.exs', expand('%:p:h', 1))
let mix_file = syntastic#util#findFileInParent('mix.exs', fnamemodify(bufname(buf), ':p:h'))
if filereadable(mix_file)
let compile_command = 'mix compile'

View File

@@ -13,28 +13,58 @@ main([File]) ->
%% `rebar.config` is looked for,
%% but it is not necessarily the one in the project root.
%% I.e. it may be one deeper in the project file hierarchy.
RebarFile = rebar_file(Dir),
%% `rebar.config` might contain relative paths.
%% They are relative to the file! Not to the project root.
RebarOpts = rebar_opts(Dir ++ "/" ++ RebarFile),
Profile = which_compile_opts_profile(filename:absname(File)),
CompileOpts = case which_build_tool(Dir, Profile) of
{rebar, RebarFile} ->
%% `rebar.config` might contain relative paths.
%% They are relative to the file! Not to the project root.
%% rebar specific begin
rebar_opts(RebarFile);
%% rebar specific end
{erlangmk, ErlangMkDir} ->
%% Erlang.mk specific begin
erlangmk_opts(ErlangMkDir, Profile);
%% Erlang.mk specific end
undefined ->
fallback_opts()
end,
code:add_patha(filename:absname("ebin")),
%% `compile:file/2` requires the `{i, Path}` to be relative
%% to CWD - no surprise here.
compile:file(File, Defs ++ translate_paths(Dir, RebarOpts));
compile:file(File, Defs ++ translate_paths(Dir, CompileOpts));
main(_) ->
io:format("Usage: ~s <file>~n", [escript:script_name()]),
halt(1).
rebar_file(Dir) ->
DirList = filename:split(Dir),
case lists:last(DirList) of
"test" ->
"rebar.test.config";
_ ->
"rebar.config"
which_compile_opts_profile(File) ->
case filename:basename(filename:dirname(File)) of
"test" -> test;
_ -> normal
end.
which_build_tool(Dir, Profile) ->
%% rebar specific begin
RebarFile = rebar_file(Dir, Profile),
%% rebar specific end
case filelib:is_file(RebarFile) of
true ->
{rebar, RebarFile};
false ->
%% Erlang.mk specific begin
ErlangMk = erlangmk_file(Dir),
%% Erlang.mk specific end
case filelib:is_file(ErlangMk) of
true -> {erlangmk, Dir};
false -> undefined
end
end.
rebar_file(Dir, normal) -> filename:join(Dir, "rebar.config");
rebar_file(Dir, test) -> filename:join(Dir, "rebar.test.config").
erlangmk_file(Dir) -> filename:join(Dir, "erlang.mk").
rebar_opts(RebarFile) ->
Dir = get_root(filename:dirname(RebarFile)),
case file:consult(RebarFile) of
@@ -54,6 +84,165 @@ rebar_opts(RebarFile) ->
rebar_opts("rebar.config")
end.
erlangmk_opts(BaseDir, Profile) ->
Make =
case os:getenv("MAKE") of
false ->
case os:find_executable("gmake") of
false -> "make";
Path -> Path
end;
Cmd ->
case (lists:member($/, Cmd) orelse lists:member($\\, Cmd)) of
true -> Cmd;
false -> os:find_executable(Cmd)
end
end,
ERLC_OPTS_Target =
case Profile of
normal -> "show-ERLC_OPTS";
test -> "show-TEST_ERLC_OPTS"
end,
Args = [
"--no-print-directory",
"-C", BaseDir,
"show-ERL_LIBS",
ERLC_OPTS_Target
],
try
Port = erlang:open_port({spawn_executable, Make}, [
{args, Args},
exit_status, use_stdio, stderr_to_stdout]),
case erlangmk_port_receive_loop(Port, "", BaseDir) of
{error, _} ->
fallback_opts();
{ok, {ErlLibs, ErlcOpts}} ->
[code:add_pathsa(filelib:wildcard(
filename:join([ErlLib, "*", "ebin"])))
|| ErlLib <- ErlLibs],
ErlcOpts
end
catch
error:_ ->
fallback_opts()
end.
erlangmk_port_receive_loop(Port, Stdout, BaseDir) ->
receive
{Port, {exit_status, 0}} ->
erlangmk_format_opts(Stdout, BaseDir);
{Port, {exit_status, _}} ->
{error, {erlangmk, make_target_failure}};
{Port, {data, Out}} ->
erlangmk_port_receive_loop(Port, Stdout ++ Out, BaseDir)
end.
erlangmk_format_opts(Stdout, BaseDir) ->
case string:tokens(Stdout, "\n") of
[ErlLibsLine | ErlcOptsLines] ->
ErlLibs = erlangmk_format_erl_libs(ErlLibsLine),
ErlcOpts = erlangmk_format_erlc_opts(ErlcOptsLines, BaseDir),
{ok, {ErlLibs, ErlcOpts}};
_ ->
{error, {erlangmk, incorrect_output}}
end.
erlangmk_format_erl_libs(ErlLibsLine) ->
case os:type() of
{win32, _} -> string:tokens(ErlLibsLine, ";");
_ -> string:tokens(ErlLibsLine, ":")
end.
erlangmk_format_erlc_opts(ErlcOptsLines, BaseDir) ->
erlangmk_format_erlc_opts(ErlcOptsLines, [], BaseDir).
erlangmk_format_erlc_opts(["+" ++ Option | Rest], Opts, BaseDir) ->
case make_term(Option) of
{error, _} -> erlangmk_format_erlc_opts(Rest, Opts, BaseDir);
Opt -> erlangmk_format_erlc_opts(Rest, [Opt | Opts], BaseDir)
end;
erlangmk_format_erlc_opts(["-I" ++ Opt | Rest], Opts, BaseDir)
when Opt =/= "" ->
erlangmk_format_erlc_opts(["-I", Opt | Rest], Opts, BaseDir);
erlangmk_format_erlc_opts(["-I", [C | _] = Dir | Rest], Opts, BaseDir)
when C =/= $- andalso C =/= $+ ->
AbsDir = filename:absname(Dir, BaseDir),
erlangmk_format_erlc_opts(Rest, [{i, AbsDir} | Opts], BaseDir);
erlangmk_format_erlc_opts(["-W" ++ Warn | Rest], Opts, BaseDir)
when Warn =/= "" ->
erlangmk_format_erlc_opts(["-W", Warn | Rest], Opts, BaseDir);
erlangmk_format_erlc_opts(["-W", Warn | Rest], Opts, BaseDir) ->
case Warn of
"all" ->
erlangmk_format_erlc_opts(Rest, [{warn_format, 999} | Opts],
BaseDir);
"error" ->
erlangmk_format_erlc_opts(Rest, [warnings_as_errors | Opts],
BaseDir);
"" ->
erlangmk_format_erlc_opts(Rest, [{warn_format, 1} | Opts],
BaseDir);
_ ->
try list_to_integer(Warn) of
Level ->
erlangmk_format_erlc_opts(Rest,
[{warn_format, Level} | Opts], BaseDir)
catch
error:badarg ->
erlangmk_format_erlc_opts(Rest, Opts, BaseDir)
end
end;
erlangmk_format_erlc_opts(["-D" ++ Opt | Rest], Opts, BaseDir)
when Opt =/= "" ->
erlangmk_format_erlc_opts(["-D", Opt | Rest], Opts, BaseDir);
erlangmk_format_erlc_opts(["-D", [C | _] = Val0 | Rest], Opts, BaseDir)
when C =/= $- andalso C =/= $+ ->
{Key0, Val1} = split_at_equals(Val0, []),
Key = list_to_atom(Key0),
case Val1 of
[] ->
erlangmk_format_erlc_opts(Rest, [{d, Key} | Opts], BaseDir);
Val2 ->
case make_term(Val2) of
{error, _} ->
erlangmk_format_erlc_opts(Rest, Opts, BaseDir);
Val ->
erlangmk_format_erlc_opts(Rest, [{d, Key, Val} | Opts], BaseDir)
end
end;
erlangmk_format_erlc_opts([PathFlag, [_ | _] = Dir | Rest], Opts, BaseDir)
when PathFlag =:= "-pa" orelse PathFlag =:= "-pz" ->
AbsDir = filename:absname(Dir, BaseDir),
case PathFlag of
"-pa" -> code:add_patha(AbsDir);
"-pz" -> code:add_pathz(AbsDir)
end,
erlangmk_format_erlc_opts(Rest, Opts, BaseDir);
erlangmk_format_erlc_opts([_ | Rest], Opts, BaseDir) ->
erlangmk_format_erlc_opts(Rest, Opts, BaseDir);
erlangmk_format_erlc_opts([], Opts, _) ->
lists:reverse(Opts).
%% Function imported from erl_compile.erl from Erlang 19.1.
make_term(Str) ->
case erl_scan:string(Str) of
{ok, Tokens, _} ->
case erl_parse:parse_term(Tokens ++ [{dot, 1}]) of
{ok, Term} -> Term;
{error, Reason} -> {error, Reason}
end;
{error, Reason, _} ->
{error, Reason}
end.
%% Function imported from erl_compile.erl from Erlang 19.1.
split_at_equals([$=|T], Acc) ->
{lists:reverse(Acc),T};
split_at_equals([H|T], Acc) ->
split_at_equals(T, [H|Acc]);
split_at_equals([], Acc) ->
{lists:reverse(Acc),[]}.
fallback_opts() ->
code:add_pathsa(filelib:wildcard("deps/*/ebin")),
code:add_pathsa(nested_app_ebins()),

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: erlang.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Pawel Salata <rockplayer.pl 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
@@ -25,11 +25,13 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_erlang_escript_GetLocList() dict
if expand('%:e', 1) ==# 'hrl'
let buf = bufnr('')
if fnamemodify(bufname(buf), ':e') ==# 'hrl'
return []
endif
let shebang = syntastic#util#parseShebang()
let shebang = syntastic#util#parseShebang(buf)
if shebang['exe'] ==# 'escript'
let args = '-s'
let post_args = ''
@@ -39,7 +41,7 @@ function! SyntaxCheckers_erlang_escript_GetLocList() dict
endif
let makeprg = self.makeprgBuild({
\ 'args_after': args,
\ 'fname': syntastic#util#shexpand('%:p'),
\ 'fname': syntastic#util#shexpand(fnamemodify(bufname(buf), ':p')),
\ 'post_args_after': post_args })
let errorformat =

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: ruby.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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
@@ -31,7 +31,8 @@ function! SyntaxCheckers_eruby_ruby_GetLocList() dict
let s:ruby_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 9])
endif
let fname = "'" . escape(expand('%', 1), "\\'") . "'"
let buf = bufnr('')
let fname = "'" . escape(bufname(buf), "\\'") . "'"
" TODO: encodings became useful in ruby 1.9 :)
if s:ruby_new
@@ -69,7 +70,7 @@ function! SyntaxCheckers_eruby_ruby_GetLocList() dict
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'defaults': { 'bufnr': bufnr(''), 'vcol': 1 } })
\ 'defaults': { 'bufnr': buf, 'vcol': 1 } })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: fortran.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Karl Yngve Lervåg <karl.yngve@lervag.net>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -28,8 +28,9 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_glsl_cgc_GetLocList() dict " {{{1
let buf = bufnr('')
let makeprg = self.makeprgBuild({
\ 'args_before': '-oglsl -profile ' . s:GetProfile(),
\ 'args_before': '-oglsl -profile ' . s:GetProfile(buf),
\ 'args': (exists('g:syntastic_glsl_options') ? ' ' . g:syntastic_glsl_options : '') })
let errorformat =
@@ -43,27 +44,11 @@ endfunction " }}}1
" Utilities {{{1
function! s:GetProfile() " {{{2
let save_view = winsaveview()
let old_foldenable = &foldenable
let old_lazyredraw = &lazyredraw
let &lazyredraw = 1
let &foldenable = 0
call cursor(1, 1)
let magic = '\m\C^// profile:\s*'
let line = search(magic, 'c')
call winrestview(save_view)
let &foldenable = old_foldenable
let &lazyredraw = old_lazyredraw
if line
let profile = matchstr(getline(line), magic . '\zs.*')
else
let extensions = exists('g:syntastic_glsl_extensions') ? g:syntastic_glsl_extensions : s:glsl_extensions
let profile = get(extensions, tolower(expand('%:e', 1)), 'gpu_vert')
function! s:GetProfile(buf) " {{{2
let profile = matchstr(get(filter(getbufline(a:buf, 1, 100), 'v:val =~# "\\m\\C^//\\s*profile:"'), 0, ''), '\m\C^//\s*profile:\s*\zs.*')
if profile ==# ''
let extensions = syntastic#util#bufVar(a:buf, 'glsl_extensions', s:glsl_extensions)
let profile = get(extensions, tolower(fnamemodify(bufname(a:buf), ':e')), 'gpu_vert')
endif
return profile

View File

@@ -30,6 +30,7 @@ function! SyntaxCheckers_go_go_GetLocList() dict
if !exists('s:go_new')
let s:go_new = syntastic#util#versionIsAtLeast(self.getVersion(self.getExecEscaped() . ' version'), [1, 5])
endif
let buf = bufnr('')
" Check with gofmt first, since `go build` and `go test` might not report
" syntax errors in the current file if another file with syntax error is
@@ -53,14 +54,14 @@ function! SyntaxCheckers_go_go_GetLocList() dict
" Test files, i.e. files with a name ending in `_test.go`, are not
" compiled by `go build`, therefore `go test` must be called for those.
if match(expand('%', 1), '\m_test\.go$') == -1
let cmd = 'build'
let opts = syntastic#util#var('go_go_build_args', s:go_new ? '-buildmode=archive' : '')
let cleanup = 0
else
if bufname(buf) =~# '\m_test\.go$'
let cmd = 'test -c'
let opts = syntastic#util#var('go_go_test_args', s:go_new ? '-buildmode=archive' : '')
let opts = syntastic#util#bufVar(buf, 'go_go_test_args', s:go_new ? '-buildmode=archive' : '')
let cleanup = 1
else
let cmd = 'build'
let opts = syntastic#util#bufVar(buf, 'go_go_build_args', s:go_new ? '-buildmode=archive' : '')
let cleanup = 0
endif
let opt_str = (type(opts) != type('') || opts !=# '') ? join(syntastic#util#argsescape(opts)) : opts
let makeprg = self.getExecEscaped() . ' ' . cmd . ' ' . opt_str
@@ -82,12 +83,12 @@ function! SyntaxCheckers_go_go_GetLocList() dict
let errors = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h', 1),
\ 'cwd': fnamemodify(bufname(buf), ':p:h'),
\ 'env': {'GOGC': 'off'},
\ 'defaults': {'type': 'e'} })
if cleanup
call delete(expand('%:p:h', 1) . syntastic#util#Slash() . expand('%:p:h:t', 1) . '.test')
call delete(fnamemodify(bufname(buf), ':p:h') . syntastic#util#Slash() . fnamemodify(bufname(buf), ':p:h') . '.test')
endif
return errors

View File

@@ -19,9 +19,10 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_gometalinter_GetLocList() dict
let buf = bufnr('')
let makeprg = self.makeprgBuild({
\ 'args': '-t',
\ 'fname': syntastic#util#shexpand('%:p:h') })
\ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p:h')) })
let errorformat =
\ '%f:%l:%c:%trror: %m,' .

View File

@@ -19,8 +19,25 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_gotype_GetLocList() dict
let buf = bufnr('')
if !exists('s:go_new')
let command = syntastic#util#shescape(syntastic#util#bufVar(buf, 'go_go_exec', 'go')) . ' version'
let version_output = syntastic#util#system(command)
call self.log('finding go version: ' . string(command) . ': ' .
\ string(split(version_output, "\n", 1)) .
\ (v:shell_error ? ' (exit code ' . v:shell_error . ')' : ''))
let parsed_ver = syntastic#util#parseVersion(version_output)
if len(parsed_ver)
let s:go_new = syntastic#util#versionIsAtLeast(parsed_ver, [1, 8])
else
call syntastic#log#error("checker " . self.getCName() . ": can't parse go version (abnormal termination?)")
return []
endif
endif
let makeprg = self.makeprgBuild({
\ 'args': (expand('%', 1) =~# '\m_test\.go$' ? '-a' : ''),
\ 'args': (bufname(buf) =~# '\m_test\.go$' ? (s:go_new ? '-t' : '-a') : ''),
\ 'fname': '.' })
let errorformat =
@@ -34,7 +51,7 @@ function! SyntaxCheckers_go_gotype_GetLocList() dict
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h', 1),
\ 'cwd': fnamemodify(bufname(buf), ':p:h'),
\ 'defaults': {'type': 'e'} })
endfunction

View File

@@ -19,6 +19,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_govet_GetLocList() dict
let buf = bufnr('')
let makeprg = self.getExecEscaped() . ' vet'
let errorformat =
@@ -33,7 +34,7 @@ function! SyntaxCheckers_go_govet_GetLocList() dict
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h', 1),
\ 'cwd': fnamemodify(bufname(buf), ':p:h'),
\ 'defaults': {'type': 'w'} })
endfunction

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: haml.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: handlebars.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: hdevtools.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Anthony Carapetis <anthony.carapetis 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
@@ -25,9 +25,10 @@ function! SyntaxCheckers_haskell_hdevtools_GetLocList() dict
let g:syntastic_haskell_hdevtools_args = g:hdevtools_options
endif
let buf = bufnr('')
let makeprg = self.makeprgBuild({
\ 'exe_after': 'check',
\ 'fname': syntastic#util#shexpand('%:p') })
\ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) })
let errorformat =
\ '%-Z %#,'.

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: hlint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Nicolas Wu <nicolas.wu at gmail dot com>
"License: BSD
"============================================================================
@@ -14,8 +14,9 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haskell_hlint_GetLocList() dict
let buf = bufnr('')
let makeprg = self.makeprgBuild({
\ 'fname': syntastic#util#shexpand('%:p')})
\ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) })
let errorformat =
\ '%E%f:%l:%v: Error while reading hint file\, %m,' .

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: scan.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: haxe.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: David Bernard <david.bernard.31 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
@@ -19,12 +19,10 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_haxe_haxe_GetLocList() dict
if exists('b:vaxe_hxml')
let hxml = b:vaxe_hxml
elseif exists('g:vaxe_hxml')
let hxml = g:vaxe_hxml
else
let hxml = syntastic#util#findGlobInParent('*.hxml', expand('%:p:h', 1))
let buf = bufnr('')
let hxml = syntastic#util#bufRawVar(buf, 'vaxe_hxml')
if hxml ==# ''
let hxml = syntastic#util#findGlobInParent('*.hxml', fnamemodify(bufname(buf), ':p:h'))
endif
let hxml = fnamemodify(hxml, ':p')
@@ -32,9 +30,12 @@ function! SyntaxCheckers_haxe_haxe_GetLocList() dict
if hxml !=# ''
let makeprg = self.makeprgBuild({
\ 'fname': syntastic#util#shescape(fnamemodify(hxml, ':t')) })
\ 'fname': syntastic#util#shescape(fnamemodify(hxml, ':t')),
\ 'args_after' : ['--no-output'] })
let errorformat = '%E%f:%l: characters %c-%n : %m'
let errorformat =
\ '%W%f:%l: characters %c-%n : Warning : %m,' .
\ '%E%f:%l: characters %c-%n : %m'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: hss.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Justin Donaldson (jdonaldson@gmail.com)
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -0,0 +1,25 @@
"============================================================================
"File: stylelint.vim
"Description: Syntax checking plugin for syntastic using `stylelint`
" (https://github.com/stylelint/stylelint).
"Maintainer: Tim Carry <tim at pixelastic 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_stylelint_checker')
finish
endif
let g:loaded_syntastic_html_stylelint_checker = 1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'html',
\ 'name': 'stylelint',
\ 'redirect': 'css/stylelint'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: tidy.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: validator.vim
"Description: Syntax checking plugin for syntastic.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
@@ -31,7 +31,8 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_html_validator_GetLocList() dict
let fname = syntastic#util#shexpand('%')
let buf = bufnr('')
let fname = syntastic#util#shescape(fnamemodify(bufname(buf), ':p'))
let makeprg = self.getExecEscaped() . ' -q -L -s --compressed -F out=gnu -F asciiquotes=yes' .
\ (g:syntastic_html_validator_parser !=# '' ? ' -F parser=' . g:syntastic_html_validator_parser : '') .
\ (g:syntastic_html_validator_nsfilter !=# '' ? ' -F nsfilter=' . g:syntastic_html_validator_nsfilter : '') .

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: w3.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Martin Grenfell <martin.grenfell 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
@@ -23,8 +23,9 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_html_w3_GetLocList() dict
let buf = bufnr('')
let makeprg = self.getExecEscaped() . ' -q -L -s -F output=json ' .
\ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' .
\ '-F uploaded_file=@' . syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) . '\;type=text/html ' .
\ g:syntastic_html_w3_api
let errorformat =

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: checkstyle.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Dmitry Geurkov <d.geurkov 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
@@ -40,6 +40,8 @@ endfunction
function! SyntaxCheckers_java_checkstyle_GetLocList() dict
let buf = bufnr('')
" classpath
if !exists('s:sep')
let s:sep = syntastic#util#isRunningWindows() || has('win32unix') ? ';' : ':'
@@ -58,7 +60,7 @@ function! SyntaxCheckers_java_checkstyle_GetLocList() dict
\ '-f', 'xml' ])
" filename
let fname = syntastic#util#shescape( expand('%:p:h', 1) . syntastic#util#Slash() . expand('%:t', 1) )
let fname = syntastic#util#shescape( fnamemodify(bufname(buf), ':p:h') . syntastic#util#Slash() . fnamemodify(bufname(buf), ':t') )
if has('win32unix')
let fname = substitute(syntastic#util#system('cygpath -m ' . fname), '\m\%x00', '', 'g')
endif

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: javac.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Jochen Keil <jochen.keil at gmail dot com>
" Dmitry Geurkov <d.geurkov at gmail dot com>
"License: This program is free software. It comes without any warranty,
@@ -223,7 +223,7 @@ endfunction " }}}2
function! s:SaveClasspath() " {{{2
" build classpath from lines
let path = ''
let lines = getline(1, line('$'))
let lines = getline(1, '$')
for l in lines
let path = s:AddToClasspath(path, l)
endfor
@@ -281,7 +281,7 @@ endfunction " }}}2
function! s:SaveConfig() " {{{2
" get lines
let lines = getline(1, line('$'))
let lines = getline(1, '$')
if g:syntastic_java_javac_config_file_enabled
" save config file lines
call writefile(lines, expand(g:syntastic_java_javac_config_file, 1))

View File

@@ -42,11 +42,12 @@ function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict
call syntastic#log#deprecationWarn('javascript_closure_compiler_options', 'javascript_closurecompiler_args')
call syntastic#log#deprecationWarn('javascript_closure_compiler_file_list', 'javascript_closurecompiler_file_list')
let flist = expand(get(g:, 'syntastic_javascript_closurecompiler_file_list', ''), 1)
let buf = bufnr('')
let flist = expand(syntastic#util#bufVar(buf, 'javascript_closurecompiler_file_list'), 1)
if filereadable(flist)
let file_list = map( readfile(flist), 'expand(v:var, 1)' )
else
let file_list = [expand('%', 1)]
let file_list = [bufname(buf)]
endif
let makeprg = self.makeprgBuild({

View File

@@ -25,17 +25,18 @@ function! SyntaxCheckers_javascript_flow_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
return syntastic#util#versionIsAtLeast(self.getVersion(self.getExecEscaped() . ' version'), [0, 18, 1])
return syntastic#util#versionIsAtLeast(self.getVersion(self.getExecEscaped() . ' version'), [0, 34])
endfunction
function! SyntaxCheckers_javascript_flow_GetLocList() dict
if syntastic#util#findFileInParent('.flowconfig', expand('%:p:h', 1)) ==# ''
let buf = bufnr('')
if syntastic#util#findFileInParent('.flowconfig', fnamemodify(bufname(buf), ':p:h')) ==# ''
return []
endif
let makeprg = self.makeprgBuild({
\ 'exe': self.getExecEscaped() . ' check',
\ 'args_after': '--show-all-errors --json' })
\ 'exe': self.getExecEscaped() . ' status',
\ 'args_after': '--quiet --show-all-errors --json' })
let errorformat =
\ '%f:%l:%c:%n: %m,' .

View File

@@ -0,0 +1,51 @@
"============================================================================
"File: lint.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_julia_lint_checker')
finish
endif
let g:loaded_syntastic_julia_lint_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_julia_lint_GetHighlightRegex(item)
let term = matchstr(a:item['text'], '\m^\S\+\ze:')
return term !=# '' ? '\V' . escape(term, '\') : ''
endfunction
function! SyntaxCheckers_julia_lint_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ syntastic#util#system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('import Lint')) ==# '' &&
\ v:shell_error == 0
endfunction
function! SyntaxCheckers_julia_lint_GetLocList() dict
let buf = bufnr('')
let makeprg = self.getExecEscaped() . ' -e ' . syntastic#util#shescape('using Lint; display(filter(err -> !isinfo(err), lintfile("' . escape(bufname(buf), '\"') . '")))')
let errorformat = '%f:%l %t%n %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'julia',
\ 'name': 'lint',
\ 'exec': 'julia' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: less.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Julien Blanchard <julien at sideburns dot eu>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: recess.vim
"Description: Syntax checking plugin for syntastic.vim using `recess`
"Description: Syntax checking plugin for syntastic using `recess`
" (http://twitter.github.io/recess/).
"Maintainer: Tim Carry <tim at pixelastic dot com>
"License: This program is free software. It comes without any warranty,

View File

@@ -0,0 +1,23 @@
"============================================================================
"File: stylelint.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_less_stylelint_checker')
finish
endif
let g:loaded_syntastic_less_stylelint_checker = 1
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'less',
\ 'name': 'stylelint',
\ 'redirect': 'css/stylelint'})
" vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: lex.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: limbo.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Alex Efros <powerman-asdf@ya.ru>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
@@ -19,6 +19,7 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_limbo_limbo_GetLocList() dict
let buf = bufnr('')
let include = $INFERNO_HOME !=# '' ? '-I$INFERNO_HOME ' : ''
" don't generate .dis in current dir while checking syntax,
" .dis should be generated by `mk`
@@ -27,7 +28,7 @@ function! SyntaxCheckers_limbo_limbo_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_before': include . '-w' . output })
let errorformat = '%E%f:%l:%m'
if expand('%', 1) =~# '\m\.m$'
if bufname(buf) =~# '\m\.m$'
let errorformat = '%-G%f:%l: near ` EOF ` : no implementation module,' . errorformat
endif

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: lisp.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Karl Yngve Lervåg <karl.yngve@lervag.net>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
@@ -19,13 +19,13 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_lisp_clisp_GetLocList() dict
let buf = bufnr('')
let tmpdir = syntastic#util#tmpdir()
let out = tmpdir !=# '.' ? ('-o ' . syntastic#util#shescape(tmpdir . syntastic#util#Slash() . 'syntastic_' . getpid())) : ''
let makeprg = self.makeprgBuild({
\ 'args_after': '-q',
\ 'fname_before': '-c',
\ 'post_args_after': out })
\ 'post_args_after': ['-o', tmpdir] })
let errorformat =
\ '%-G;%.%#,' .
@@ -40,7 +40,7 @@ function! SyntaxCheckers_lisp_clisp_GetLocList() dict
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr('')} })
\ 'defaults': {'bufnr': buf} })
call syntastic#util#rmrf(tmpdir)

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: llvm.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Andrew Kelley <superjoe30@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: lua.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: mdl.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Charles Beynon <etothepiipower 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: matlab.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Jason Graham <jason at the-graham dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: mercury.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Joshua Rahm (joshuarahm@gmail.com)
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: nasm.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Håvard Pettersson <haavard.pettersson 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
@@ -19,9 +19,10 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_nasm_nasm_GetLocList() dict
let buf = bufnr('')
let makeprg = self.makeprgBuild({
\ 'args_after': '-X gnu' .
\ ' -I ' . syntastic#util#shescape(expand('%:p:h', 1) . syntastic#util#Slash()) .
\ ' -I ' . syntastic#util#shescape(fnamemodify(bufname(buf), ':p:h') . syntastic#util#Slash()) .
\ ' ' . syntastic#c#NullOutput() })
let errorformat = '%f:%l: %t%*[^:]: %m'

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: igor.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: mandoc.vim
"Description: Syntax checking plugin for syntastic.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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: objc.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: oclint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: "UnCO" Lin <undercooled aT lavabit com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: objcpp.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Gregor Uhlenheuer <kongo2002 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

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: oclint.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: "UnCO" Lin <undercooled aT lavabit com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: ocaml.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: Török Edwin <edwintorok 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
@@ -44,7 +44,8 @@ function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict " {{{1
endfunction " }}}1
function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict " {{{1
let makeprg = s:GetMakeprg()
let buf = bufnr('')
let makeprg = s:GetMakeprg(buf)
if makeprg ==# ''
return []
endif
@@ -65,7 +66,7 @@ function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict " {{{1
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr('')} })
\ 'defaults': {'bufnr': buf} })
for e in loclist
if get(e, 'col', 0) && get(e, 'nr', 0)
@@ -79,40 +80,41 @@ endfunction " }}}1
" Utilities {{{1
function! s:GetMakeprg() " {{{2
function! s:GetMakeprg(buf) " {{{2
return
\ g:syntastic_ocaml_use_ocamlc ? g:syntastic_ocaml_use_ocamlc :
\ (g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')) ? s:GetOcamlcMakeprg() :
\ s:GetOtherMakeprg()
\ (g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')) ? s:GetOcamlcMakeprg(a:buf) :
\ s:GetOtherMakeprg(a:buf)
endfunction " }}}2
function! s:GetOcamlcMakeprg() " {{{2
function! s:GetOcamlcMakeprg(buf) " {{{2
let build_cmd = g:syntastic_ocaml_use_janestreet_core ?
\ 'ocamlc -I ' . syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir) : 'ocamlc'
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
let build_cmd .= ' -c ' . syntastic#util#shescape(bufname(a:buf))
return build_cmd
endfunction " }}}2
function! s:GetOcamlBuildMakeprg() " {{{2
function! s:GetOcamlBuildMakeprg(buf) " {{{2
return 'ocamlbuild -quiet -no-log -tag annot,' . s:ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
\ syntastic#util#shexpand('%:r') . '.cmi'
\ syntastic#util#shexpand(fnamemodify(bufname(a:buf), ':r')) . '.cmi'
endfunction " }}}2
function! s:GetOtherMakeprg() " {{{2
function! s:GetOtherMakeprg(buf) " {{{2
"TODO: give this function a better name?
"
"TODO: should use throw/catch instead of returning an empty makeprg
let extension = expand('%:e', 1)
let fname = bufname(a:buf)
let extension = fnamemodify(fname, ':e')
let makeprg = ''
if stridx(extension, 'mly') >= 0 && executable('menhir')
" ocamlyacc output can't be redirected, so use menhir
let makeprg = 'menhir --only-preprocess ' . syntastic#util#shexpand('%') . ' >' . syntastic#util#DevNull()
let makeprg = 'menhir --only-preprocess ' . syntastic#util#shescape(fname) . ' >' . syntastic#util#DevNull()
elseif stridx(extension,'mll') >= 0 && executable('ocamllex')
let makeprg = 'ocamllex -q ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shexpand('%')
let makeprg = 'ocamllex -q ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shescape(fname)
else
let makeprg = 'camlp4o ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shexpand('%')
let makeprg = 'camlp4o ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shescape(fname)
endif
return makeprg

View File

@@ -51,13 +51,14 @@ function! SyntaxCheckers_perl_perl_IsAvailable() dict " {{{1
endfunction " }}}1
function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
let buf = bufnr('')
if type(g:syntastic_perl_lib_path) == type('')
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
let includes = split(g:syntastic_perl_lib_path, ',')
else
let includes = copy(syntastic#util#var('perl_lib_path', []))
let includes = copy(syntastic#util#bufVar(buf, 'perl_lib_path', []))
endif
let shebang = syntastic#util#parseShebang()
let shebang = syntastic#util#parseShebang(buf)
let extra = map(includes, '"-I" . v:val') +
\ (index(shebang['args'], '-T') >= 0 ? ['-T'] : []) +
\ (index(shebang['args'], '-t') >= 0 ? ['-t'] : [])

Some files were not shown because too many files have changed in this diff Show More