Updated Plugins
This commit is contained in:
@@ -58,19 +58,19 @@ their script to find them.
|
||||
|
||||
At the time of this writing, syntastic has checking plugins for ACPI
|
||||
Source Language, ActionScript, Ada, Ansible configurations, API Blueprint,
|
||||
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C,
|
||||
C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
|
||||
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, C++,
|
||||
C#, Cabal, Chef, CMake, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
|
||||
DocBook, Dockerfile, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata,
|
||||
GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON,
|
||||
JSX, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown,
|
||||
JSX, Julia, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown,
|
||||
MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl
|
||||
POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly
|
||||
Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG,
|
||||
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
|
||||
6, Perl POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug
|
||||
(formerly Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax
|
||||
NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
|
||||
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
|
||||
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
|
||||
Zope page templates, and Zsh. See the [manual][checkers] for details about the
|
||||
corresponding supported checkers (`:help syntastic-checkers` in Vim).
|
||||
Vim help, VimL, Vue.js, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models,
|
||||
z80, Zope page templates, and Zsh. See the [manual][checkers] for details about
|
||||
the corresponding supported checkers (`:help syntastic-checkers` in Vim).
|
||||
|
||||
A number of third-party Vim plugins also provide checkers for syntastic, for
|
||||
example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust],
|
||||
@@ -101,10 +101,10 @@ enabled.
|
||||
Syntastic itself has rather relaxed requirements: it doesn't have any external
|
||||
dependencies, and it needs a version of [Vim][vim] compiled with a few common
|
||||
features: `autocmd`, `eval`, `file_in_path`, `modify_fname`, `quickfix`,
|
||||
`reltime`, and `user_commands`. Not all possible combinations of features that
|
||||
include the ones above make equal sense on all operating systems, but Vim
|
||||
version 7 or later with the "normal", "big", or "huge" feature sets should be
|
||||
fine.
|
||||
`reltime`, `statusline`, and `user_commands`. Not all possible combinations of
|
||||
features that include the ones above make equal sense on all operating systems,
|
||||
but Vim version 7 or later with the "normal", "big", or "huge" feature sets
|
||||
should be fine.
|
||||
|
||||
Syntastic should work with any modern plugin managers for Vim, such as
|
||||
[NeoBundle][neobundle], [Pathogen][pathogen], [Vim-Addon-Manager][vam],
|
||||
@@ -437,15 +437,15 @@ scripts.
|
||||
__4.12. Q. How can I check scripts written for different versions of Ruby?__
|
||||
|
||||
A. Install a Ruby version manager such as [rvm][rvm] or [rbenv][rbenv],
|
||||
activate the environment for the relevant version of Ruby, and install in it
|
||||
the checkers you want to use. Set `g:syntastic_ruby_checkers` accordingly in
|
||||
your `vimrc`, and run [Vim][vim] from the virtual environment.
|
||||
activate the relevant version of Ruby, and install in it the checkers you want
|
||||
to use. Set `g:syntastic_ruby_checkers` accordingly in your `vimrc`, and run
|
||||
[Vim][vim] under the relevant Ruby version.
|
||||
|
||||
If you're starting Vim from a desktop manager rather than from a terminal you
|
||||
might need to write wrapper scripts around your checkers, to activate the
|
||||
virtual environment before running the actual checks. Then you'll need to
|
||||
point the relevant `g:syntastic_ruby_<checker>_exec` variables to the wrapper
|
||||
scripts.
|
||||
If you're starting Vim from a desktop manager rather than from a terminal
|
||||
and depending on the version manager you use you might need to write wrapper
|
||||
scripts around your checkers, to activate the relevant version of Ruby
|
||||
before running the actual checks. Then you'll need to point the relevant
|
||||
`g:syntastic_ruby_<checker>_exec` variables to the wrapper scripts.
|
||||
|
||||
<a name="faqperl"></a>
|
||||
|
||||
|
@@ -65,6 +65,17 @@ function! syntastic#postprocess#guards(errors) abort " {{{2
|
||||
return a:errors
|
||||
endfunction " }}}2
|
||||
|
||||
" convert error messages from UTF-8 to the current encoding
|
||||
function! syntastic#postprocess#iconv(errors) abort " {{{2
|
||||
if has('iconv') && &encoding !=# '' && &encoding !=# 'utf-8'
|
||||
for e in a:errors
|
||||
let e['text'] = iconv(e['text'], "utf-8", &encoding)
|
||||
endfor
|
||||
endif
|
||||
|
||||
return a:errors
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
@@ -8,6 +8,37 @@ set cpo&vim
|
||||
|
||||
" Public functions {{{1
|
||||
|
||||
function! syntastic#preprocess#bandit(errors) abort " {{{2
|
||||
let out = []
|
||||
let json = s:_decode_JSON(join(a:errors, ''))
|
||||
|
||||
if type(json) == type({}) && has_key(json, 'results') && type(json['results']) == type([])
|
||||
for issue in json['results']
|
||||
if type(issue) == type({})
|
||||
try
|
||||
call add(out,
|
||||
\ issue['filename'] . ':' .
|
||||
\ issue['line_number'] . ':' .
|
||||
\ { 'LOW': 'I', 'MEDIUM': 'W', 'HIGH': 'E' }[issue['issue_severity']] . ':' .
|
||||
\ issue['test_id'][1:] . ':' .
|
||||
\ issue['issue_text'] .
|
||||
\ ' [' . issue['test_name'] . '] (confidence: ' . issue['issue_confidence'] . ')')
|
||||
catch /\m^Vim\%((\a\+)\)\=:E716/
|
||||
call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue))
|
||||
let out = []
|
||||
break
|
||||
endtry
|
||||
else
|
||||
call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue))
|
||||
endif
|
||||
endfor
|
||||
else
|
||||
call syntastic#log#warn('checker python/bandit: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
|
||||
return out
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#cabal(errors) abort " {{{2
|
||||
let out = []
|
||||
let star = 0
|
||||
@@ -98,6 +129,35 @@ function! syntastic#preprocess#dockerfile_lint(errors) abort " {{{2
|
||||
return out
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#dscanner(errors) abort " {{{2
|
||||
let idx = 0
|
||||
while idx < len(a:errors) && a:errors[idx][0] !=# '{'
|
||||
let idx += 1
|
||||
endwhile
|
||||
let errs = s:_decode_JSON(join(a:errors[idx :], ''))
|
||||
|
||||
let out = []
|
||||
if type(errs) == type({}) && has_key(errs, 'issues') && type(errs['issues']) == type([])
|
||||
for issue in errs['issues']
|
||||
try
|
||||
call add(out,
|
||||
\ issue['fileName'] . ':' .
|
||||
\ issue['line'] . ':' .
|
||||
\ issue['column'] . ':' .
|
||||
\ issue['message'] . ' [' . issue['key'] . ']')
|
||||
catch /\m^Vim\%((\a\+)\)\=:E716/
|
||||
call syntastic#log#warn('checker d/dscanner: unrecognized error item ' . string(issue))
|
||||
let out = []
|
||||
break
|
||||
endtry
|
||||
endfor
|
||||
else
|
||||
call syntastic#log#warn('checker d/dscanner: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
|
||||
return out
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#flow(errors) abort " {{{2
|
||||
let idx = 0
|
||||
while idx < len(a:errors) && a:errors[idx][0] !=# '{'
|
||||
@@ -204,13 +264,55 @@ function! syntastic#preprocess#perl(errors) abort " {{{2
|
||||
return syntastic#util#unique(out)
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#prospector(errors) abort " {{{2
|
||||
function! syntastic#preprocess#perl6(errors) abort " {{{2
|
||||
if a:errors[0] ==# 'Syntax OK'
|
||||
return []
|
||||
endif
|
||||
|
||||
let errs = s:_decode_JSON(join(a:errors, ''))
|
||||
|
||||
let out = []
|
||||
if type(errs) == type({}) && has_key(errs, 'messages')
|
||||
if type(errs['messages']) == type([])
|
||||
for e in errs['messages']
|
||||
if type(errs) == type({})
|
||||
try
|
||||
for val in values(errs)
|
||||
let line = get(val, 'line', 0)
|
||||
let pos = get(val, 'pos', 0)
|
||||
if pos && has('byte_offset')
|
||||
let line_pos = byte2line(pos + 1)
|
||||
let column = line_pos > 0 ? pos - line2byte(line_pos) + 2 : 0
|
||||
else
|
||||
let column = 0
|
||||
endif
|
||||
|
||||
call add(out, join([
|
||||
\ get(val, 'filename', ''),
|
||||
\ line,
|
||||
\ column,
|
||||
\ get(val, 'message', '') ], ':'))
|
||||
endfor
|
||||
catch /\m^Vim\%((\a\+)\)\=:E716/
|
||||
call syntastic#log#warn('checker perl6/perl6: unrecognized error item ' . string(val))
|
||||
let out = []
|
||||
endtry
|
||||
else
|
||||
call syntastic#log#warn('checker perl6/perl6: unrecognized error format')
|
||||
endif
|
||||
|
||||
return out
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#prospector(errors) abort " {{{2
|
||||
let errs = join(a:errors, '')
|
||||
if errs ==# ''
|
||||
return []
|
||||
endif
|
||||
|
||||
let json = s:_decode_JSON(errs)
|
||||
|
||||
let out = []
|
||||
if type(json) == type({}) && has_key(json, 'messages')
|
||||
if type(json['messages']) == type([])
|
||||
for e in json['messages']
|
||||
if type(e) == type({})
|
||||
try
|
||||
if e['source'] ==# 'pylint'
|
||||
@@ -240,6 +342,8 @@ function! syntastic#preprocess#prospector(errors) abort " {{{2
|
||||
else
|
||||
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
else
|
||||
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
|
||||
return out
|
||||
@@ -406,7 +510,7 @@ echomsg string(out)
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#tslint(errors) abort " {{{2
|
||||
return map(copy(a:errors), 'substitute(v:val, ''\m^\(([^)]\+)\)\s\(.\+\)$'', ''\2 \1'', "")')
|
||||
return map(copy(a:errors), 'substitute(v:val, ''\v^((ERROR|WARNING): )?\zs(\([^)]+\))\s(.+)$'', ''\4 \3'', "")')
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#validator(errors) abort " {{{2
|
||||
|
@@ -76,7 +76,7 @@ function! syntastic#util#tmpdir() abort " {{{2
|
||||
if (has('unix') || has('mac')) && executable('mktemp') && !has('win32unix')
|
||||
" TODO: option "-t" to mktemp(1) is not portable
|
||||
let tmp = $TMPDIR !=# '' ? $TMPDIR : $TMP !=# '' ? $TMP : '/tmp'
|
||||
let out = split(syntastic#util#system('mktemp -q -d ' . tmp . '/vim-syntastic-' . getpid() . '-XXXXXXXX'), "\n")
|
||||
let out = split(syntastic#util#system('mktemp -q -d ' . tmp . '/vim-syntastic-' . s:_fuzz() . '-XXXXXXXX'), "\n")
|
||||
if v:shell_error == 0 && len(out) == 1
|
||||
let tempdir = out[0]
|
||||
endif
|
||||
@@ -84,13 +84,13 @@ function! syntastic#util#tmpdir() abort " {{{2
|
||||
|
||||
if tempdir ==# ''
|
||||
if has('win32') || has('win64')
|
||||
let tempdir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-' . getpid()
|
||||
let tempdir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-' . s:_fuzz()
|
||||
elseif has('win32unix')
|
||||
let tempdir = syntastic#util#CygwinPath('/tmp/vim-syntastic-' . getpid())
|
||||
let tempdir = syntastic#util#CygwinPath('/tmp/vim-syntastic-' . s:_fuzz())
|
||||
elseif $TMPDIR !=# ''
|
||||
let tempdir = $TMPDIR . '/vim-syntastic-' . getpid()
|
||||
let tempdir = $TMPDIR . '/vim-syntastic-' . s:_fuzz()
|
||||
else
|
||||
let tempdir = '/tmp/vim-syntastic-' . getpid()
|
||||
let tempdir = '/tmp/vim-syntastic-' . s:_fuzz()
|
||||
endif
|
||||
|
||||
try
|
||||
@@ -132,9 +132,9 @@ endfunction " }}}2
|
||||
" returns
|
||||
"
|
||||
" {'exe': '/usr/bin/perl', 'args': ['-f', '-bar']}
|
||||
function! syntastic#util#parseShebang() abort " {{{2
|
||||
function! syntastic#util#parseShebang(buf) abort " {{{2
|
||||
for lnum in range(1, 5)
|
||||
let line = getline(lnum)
|
||||
let line = get(getbufline(a:buf, lnum), 0, '')
|
||||
if line =~# '^#!'
|
||||
let line = substitute(line, '\v^#!\s*(\S+/env(\s+-\S+)*\s+)?', '', '')
|
||||
let exe = matchstr(line, '\m^\S*\ze')
|
||||
@@ -253,7 +253,7 @@ endfunction " }}}2
|
||||
function! syntastic#util#findFileInParent(what, where) abort " {{{2
|
||||
let old_suffixesadd = &suffixesadd
|
||||
let &suffixesadd = ''
|
||||
let file = findfile(a:what, escape(a:where, ' ') . ';')
|
||||
let file = findfile(a:what, escape(a:where, ' ,') . ';')
|
||||
let &suffixesadd = old_suffixesadd
|
||||
return file
|
||||
endfunction " }}}2
|
||||
@@ -307,8 +307,14 @@ function! syntastic#util#fname2buf(fname) abort " {{{2
|
||||
|
||||
" this is a best-effort attempt to escape file patterns (cf. :h file-pattern)
|
||||
" XXX it fails for filenames containing something like \{2,3}
|
||||
let buf = -1
|
||||
for md in [':~:.', ':~', ':p']
|
||||
let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$')
|
||||
try
|
||||
" Older versions of Vim can throw E94 here
|
||||
let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$')
|
||||
catch
|
||||
" catch everything
|
||||
endtry
|
||||
if buf != -1
|
||||
break
|
||||
endif
|
||||
@@ -401,9 +407,6 @@ function! syntastic#util#setLastTick(buf) abort " {{{2
|
||||
call setbufvar(a:buf, 'syntastic_lasttick', getbufvar(a:buf, 'changedtick'))
|
||||
endfunction " }}}2
|
||||
|
||||
let s:_wid_base = 'syntastic_' . getpid() . '_' . reltimestr(g:_SYNTASTIC_START) . '_'
|
||||
let s:_wid_pool = 0
|
||||
|
||||
" Add unique IDs to windows
|
||||
function! syntastic#util#setWids() abort " {{{2
|
||||
for tab in range(1, tabpagenr('$'))
|
||||
@@ -614,8 +617,18 @@ endfunction "}}}2
|
||||
let s:_getbufvar = function(v:version > 703 || (v:version == 703 && has('patch831')) ? 'getbufvar' : 's:_getbufvar_dumb')
|
||||
lockvar s:_getbufvar
|
||||
|
||||
function! s:_fuzz_dumb() abort " {{{2
|
||||
return 'tmp'
|
||||
endfunction " }}}2
|
||||
|
||||
let s:_fuzz = function(exists('*getpid') ? 'getpid' : 's:_fuzz_dumb')
|
||||
lockvar s:_fuzz
|
||||
|
||||
" }}}1
|
||||
|
||||
let s:_wid_base = 'syntastic_' . s:_fuzz() . '_' . reltimestr(g:_SYNTASTIC_START) . '_'
|
||||
let s:_wid_pool = 0
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -70,7 +70,7 @@ CONTENTS *syntastic-contents*
|
||||
1. Intro *syntastic-intro*
|
||||
|
||||
Syntastic is a syntax checking plugin that runs files through external syntax
|
||||
checkers. This can be done on demand, or automatically as files are saved
|
||||
linters. This can be done on demand, or automatically as files are saved
|
||||
and opened. If syntax errors are detected, the user is notified and is happy
|
||||
because they didn't have to compile their code or execute their script to find
|
||||
them.
|
||||
@@ -83,7 +83,7 @@ plugins and uses their output to provide the syntastic functionality.
|
||||
Take a look at the list of supported filetypes and checkers: |syntastic-checkers|.
|
||||
|
||||
Note: This doc only deals with using syntastic. To learn how to write syntax
|
||||
checker integrations, see the guide on the GitHub wiki:
|
||||
checker integrations see the guide on the GitHub wiki:
|
||||
|
||||
https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide
|
||||
|
||||
@@ -98,7 +98,7 @@ You can see the list of checkers available for the current filetype with the
|
||||
`:SyntasticInfo` command.
|
||||
|
||||
You probably want to override the configured list of checkers for the
|
||||
filetypes you use, and also change the arguments passed to specific checkers
|
||||
filetypes you use, and also change the arguments passed to specific linters
|
||||
to suit your needs. See |syntastic-checker-options| below for details.
|
||||
|
||||
Use `:SyntasticCheck` to manually check right now. Use `:Errors` to open the
|
||||
@@ -143,7 +143,7 @@ activate/deactivate these features.
|
||||
* The |location-list| can be populated with the errors for the associated
|
||||
buffer
|
||||
* Erroneous parts of lines can be highlighted (this functionality is only
|
||||
provided by some syntax checkers)
|
||||
provided by some checkers)
|
||||
* Balloons (if the |+balloon_eval| feature is compiled in) can be used to
|
||||
display error messages for erroneous lines when hovering the mouse over
|
||||
them
|
||||
@@ -164,7 +164,7 @@ When syntax errors are detected a flag will be shown. The content of the flag
|
||||
is derived from the |'syntastic_stl_format'| option.
|
||||
|
||||
Please note that these settings might conflict with other Vim plugins that
|
||||
change the way statusline works. Refer to the |syntastic-compatibility| notes
|
||||
change the way 'statusline' works. Refer to the |syntastic-compatibility| notes
|
||||
below and to the respective plugins' documentation for possible solutions.
|
||||
|
||||
In particular see |syntastic-airline| below if you're using the "airline" Vim
|
||||
@@ -224,7 +224,7 @@ update the |location-list| automatically.
|
||||
------------------------------------------------------------------------------
|
||||
2.4. Error highlighting *syntastic-highlighting*
|
||||
|
||||
Some checkers provide enough information for syntastic to be able to highlight
|
||||
Some linters provide enough information for syntastic to be able to highlight
|
||||
errors. By default the SpellBad syntax highlight group is used to color errors,
|
||||
and the SpellCap group is used for warnings. If you wish to customize the
|
||||
colors for highlighting you can use the following groups:
|
||||
@@ -611,8 +611,8 @@ There are also checker-specific variants of this option, providing finer
|
||||
control. They are named |'syntastic_<filetype>_<checker>_quiet_messages'|.
|
||||
|
||||
For a particular checker, if both a |'syntastic_quiet_messages'| filter and
|
||||
a checker-specific filter are present, they are both applied (to the list of
|
||||
errors produced by the said checker). In case of conflicting values for the
|
||||
a checker-specific filter are present, they are both applied to the list of
|
||||
errors produced by the said checker. In case of conflicting values for the
|
||||
same keys, the values of the checker-specific filters take precedence.
|
||||
|
||||
*filter-overrides*
|
||||
@@ -685,15 +685,15 @@ should be safe.
|
||||
*'syntastic_exit_checks'*
|
||||
Type: boolean
|
||||
Default: 0 when running under "cmd.exe" on Windows, 1 otherwise
|
||||
Syntastic attempts to catch abnormal termination conditions from checkers by
|
||||
Syntastic attempts to catch abnormal termination conditions from linters by
|
||||
looking at their exit codes. The "cmd.exe" shell on Windows make these checks
|
||||
meaningless, by returning 1 to Vim when the checkers exit with non-zero codes.
|
||||
meaningless, by returning 1 to Vim when the linters exit with non-zero codes.
|
||||
The above variable can be used to disable exit code checks in syntastic.
|
||||
|
||||
*'syntastic_shell'*
|
||||
Type: string
|
||||
Default: Vim's 'shell'
|
||||
This is the (full path to) the shell syntastic will use to run the checkers.
|
||||
This is the (full path to) the shell syntastic will use to run the linters.
|
||||
On UNIX and Mac OS-X this shell must accept Bourne-compatible syntax for
|
||||
file "stdout" and "stderr" redirections ">file" and "2>file". Examples of
|
||||
compatible shells are "zsh", "bash", "ksh", and of course the original Bourne
|
||||
@@ -701,7 +701,7 @@ compatible shells are "zsh", "bash", "ksh", and of course the original Bourne
|
||||
|
||||
This shell is independent of Vim's 'shell', and it isn't used for interactive
|
||||
operations. It must take care to initialize all environment variables needed
|
||||
by the checkers you're using. Example: >
|
||||
by the linters you're using. Example: >
|
||||
let g:syntastic_shell = "/bin/sh"
|
||||
<
|
||||
*'syntastic_nested_autocommands'*
|
||||
@@ -769,7 +769,7 @@ use this in an autocmd to configure specific checkers for particular paths: >
|
||||
\ let b:syntastic_checkers = ["pylint"] | endif
|
||||
<
|
||||
If neither |'g:syntastic_<filetype>_checkers'| nor |'b:syntastic_checkers'|
|
||||
is set, a default list of checker is used. Beware however that this list
|
||||
is set a default list of checkers is used. Beware however that this list is
|
||||
deliberately kept minimal, for performance reasons.
|
||||
|
||||
You can specify checkers for other filetypes anywhere in these lists, by
|
||||
@@ -801,7 +801,7 @@ takes precedence over both 'b:syntastic_<filetype>_<checker>_exec' and
|
||||
------------------------------------------------------------------------------
|
||||
5.3. Configuring specific checkers *syntastic-config-makeprg*
|
||||
|
||||
Checkers are run by constructing a command line and by passing it to a shell
|
||||
Linters are run by constructing a command line and by passing it to a shell
|
||||
(see |'shell'| and |'syntastic_shell'|). In most cases this command line is
|
||||
built using an internal function named "makeprgBuild()", which provides a
|
||||
number of options that allow you to customise every part of the command that
|
||||
@@ -855,7 +855,7 @@ empty, you can set it to an empty string, e.g.: >
|
||||
*'syntastic_<filetype>_<checker>_exe'*
|
||||
The 'exe' option is special. Normally it is the same as the 'exec' attribute
|
||||
described above, but you can use it to add environment variables to the
|
||||
command line, or to change the way the checker is run. For example this setup
|
||||
command line, or to change the way the linter is run. For example this setup
|
||||
allows you to run PC-Lint on Linux, under Wine emulation: >
|
||||
let g:syntastic_c_pc_lint_exec = "wine"
|
||||
let g:syntastic_c_pc_lint_exe = "wine c:/path/to/lint-nt.exe"
|
||||
@@ -911,7 +911,7 @@ The syntax is of course identical to that of |syntastic_quiet_messages|.
|
||||
*syntastic-debug*
|
||||
|
||||
Syntastic can log a trace of its working to Vim's |message-history|. To verify
|
||||
the command line constructed by syntastic to run a checker, set the variable
|
||||
the command line constructed by syntastic to run a linter, set the variable
|
||||
|'syntastic_debug'| to a non-zero value, run the checker, then run `:mes` to
|
||||
display the messages, and look for "makeprg" in the output.
|
||||
|
||||
@@ -919,7 +919,7 @@ From a user's perspective, the useful values for |'syntastic_debug'| are 1, 3,
|
||||
and 33:
|
||||
|
||||
1 - logs syntastic's workflow
|
||||
3 - logs workflow, checker's output, and |location-list| manipulations
|
||||
3 - logs workflow, linter's output, and |location-list| manipulations
|
||||
33 - logs workflow and checker-specific details (such as version checks).
|
||||
|
||||
Debug logs can be saved to a file; see |'syntastic_debug_file'| for details.
|
||||
@@ -962,7 +962,7 @@ composite filetypes to simple ones using |'syntastic_filetype_map'|, e.g.: >
|
||||
The standard plugin |netrw| allows Vim to transparently edit files over
|
||||
network and inside archives. Currently syntastic doesn't support this mode
|
||||
of operation. It can only check files that can be accessed directly by local
|
||||
checkers, without any translation or conversion.
|
||||
linters, without any translation or conversion.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
6.3. The 'shellslash' option *syntastic-shellslash*
|
||||
@@ -1015,11 +1015,18 @@ also affect window sizes.)
|
||||
7.1. airline *syntastic-airline*
|
||||
|
||||
The "airline" Vim plugin (https://github.com/vim-airline/vim-airline) comes
|
||||
packaged with a mechanism of showing flags on the |'statusline'| according
|
||||
to your |'syntastic_stl_format'|. When using this plugin you do NOT need to
|
||||
follow the recommendation outlined in the |syntastic-statusline-flag| section
|
||||
above to modify your |'statusline'|; "airline" will make all necessary changes
|
||||
automatically.
|
||||
with an extension for showing syntastic-related flags on the |'statusline'|.
|
||||
|
||||
"airline" versions v0.8 and earlier use |'syntastic_stl_format'| to format the
|
||||
|'statusline'| flags. Newer versions ignore |'syntastic_stl_format'|, and require
|
||||
you to set variables 'airline#extensions#syntastic#stl_format_err' and
|
||||
'airline#extensions#syntastic#stl_format_warn' separately for errors and
|
||||
warnings (with the same syntax as |'syntastic_stl_format'|) if you want to
|
||||
change the flags from the defaults.
|
||||
|
||||
When using "airline" you should NOT follow the recommendation outlined in
|
||||
the |syntastic-statusline-flag| section above to modify your |'statusline'|.
|
||||
"airline" shall make all necessary changes automatically.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
7.2. The csh and tcsh shells *syntastic-csh*
|
||||
@@ -1159,7 +1166,7 @@ stick with |quickfix| lists: >
|
||||
------------------------------------------------------------------------------
|
||||
7.14. vim-virtualenv *syntastic-vim-virtualenv*
|
||||
|
||||
At the time of this writing, syntastic can't run checkers installed
|
||||
At the time of this writing, syntastic can't run linters installed
|
||||
in Python virtual environments activated by "vim-virtualenv" (see
|
||||
https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
|
||||
"vim-virtualenv".
|
||||
@@ -1181,7 +1188,7 @@ have to set |g:ycm_show_diagnostics_ui| to 0. E.g.: >
|
||||
If you're running MacVim together with the "zsh" shell (http://www.zsh.org/)
|
||||
you need to be aware that MacVim does not source your .zshrc file, but will
|
||||
source a .zshenv file. Consequently you have to move any setup steps relevant
|
||||
to the checkers you're using from .zshrc to .zshenv, otherwise your checkers
|
||||
to the linters you're using from .zshrc to .zshenv, otherwise your linters
|
||||
will misbehave when run by syntastic. This is particularly important for
|
||||
programs such as "rvm" (https://rvm.io/) or "rbenv" (http://rbenv.org/), that
|
||||
rely on setting environment variables.
|
||||
|
@@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-10'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-97'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@@ -36,7 +36,8 @@ for s:feature in [
|
||||
\ 'modify_fname',
|
||||
\ 'quickfix',
|
||||
\ 'reltime',
|
||||
\ 'user_commands'
|
||||
\ 'statusline',
|
||||
\ 'user_commands',
|
||||
\ ]
|
||||
if !has(s:feature)
|
||||
call syntastic#log#error('need Vim compiled with feature ' . s:feature)
|
||||
@@ -67,6 +68,15 @@ else
|
||||
endif
|
||||
lockvar g:_SYNTASTIC_UNAME
|
||||
|
||||
" XXX Ugly hack to make g:_SYNTASTIC_UNAME available to :SyntasticInfo without
|
||||
" polluting session namespaces
|
||||
let g:syntastic_version =
|
||||
\ g:_SYNTASTIC_VERSION .
|
||||
\ ' (Vim ' . v:version . (has('nvim') ? ', Neovim' : '') . ', ' .
|
||||
\ g:_SYNTASTIC_UNAME .
|
||||
\ (has('gui') ? ', GUI' : '') . ')'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
" }}}1
|
||||
|
||||
" Defaults {{{1
|
||||
@@ -344,13 +354,6 @@ function! s:BufWinEnterHook(fname) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:VimEnterHook() abort " {{{2
|
||||
let g:syntastic_version =
|
||||
\ g:_SYNTASTIC_VERSION .
|
||||
\ ' (Vim ' . v:version . (has('nvim') ? ', Neovim' : '') . ', ' .
|
||||
\ g:_SYNTASTIC_UNAME .
|
||||
\ (has('gui') ? ', GUI' : '') . ')'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
let buf = bufnr('')
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_AUTOCOMMANDS,
|
||||
\ 'autocmd: VimEnter, buffer ' . buf . ' = ' . string(bufname(buf)) . ', &buftype = ' . string(&buftype))
|
||||
|
@@ -19,6 +19,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'c': ['gcc'],
|
||||
\ 'cabal': ['cabal'],
|
||||
\ 'chef': ['foodcritic'],
|
||||
\ 'cmake': ['cmakelint'],
|
||||
\ 'co': ['coco'],
|
||||
\ 'cobol': ['cobc'],
|
||||
\ 'coffee': ['coffee', 'coffeelint'],
|
||||
@@ -50,6 +51,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'java': ['javac'],
|
||||
\ 'javascript': ['jshint', 'jslint'],
|
||||
\ 'json': ['jsonlint', 'jsonval'],
|
||||
\ 'julia': [],
|
||||
\ 'less': ['lessc'],
|
||||
\ 'lex': ['flex'],
|
||||
\ 'limbo': ['limbo'],
|
||||
@@ -66,6 +68,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'objcpp': ['gcc'],
|
||||
\ 'ocaml': ['camlp4o'],
|
||||
\ 'perl': ['perlcritic'],
|
||||
\ 'perl6': [],
|
||||
\ 'php': ['php', 'phpcs', 'phpmd'],
|
||||
\ 'po': ['msgfmt'],
|
||||
\ 'pod': ['podchecker'],
|
||||
@@ -101,6 +104,7 @@ let s:_DEFAULT_CHECKERS = {
|
||||
\ 'verilog': ['verilator'],
|
||||
\ 'vhdl': ['ghdl'],
|
||||
\ 'vim': ['vimlint'],
|
||||
\ 'vue': ['pug_lint_vue', 'eslint'],
|
||||
\ 'xhtml': ['tidy'],
|
||||
\ 'xml': ['xmllint'],
|
||||
\ 'xslt': ['xmllint'],
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
40
.vim/bundle/syntastic/syntax_checkers/c/cppclean.vim
Normal file
40
.vim/bundle/syntastic/syntax_checkers/c/cppclean.vim
Normal 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:
|
61
.vim/bundle/syntastic/syntax_checkers/c/flawfinder.vim
Normal file
61
.vim/bundle/syntastic/syntax_checkers/c/flawfinder.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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({
|
||||
|
@@ -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
|
||||
|
40
.vim/bundle/syntastic/syntax_checkers/cmake/cmakelint.vim
Normal file
40
.vim/bundle/syntastic/syntax_checkers/cmake/cmakelint.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
22
.vim/bundle/syntastic/syntax_checkers/cpp/cppclean.vim
Normal file
22
.vim/bundle/syntastic/syntax_checkers/cpp/cppclean.vim
Normal 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:
|
@@ -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
|
||||
|
26
.vim/bundle/syntastic/syntax_checkers/cpp/flawfinder.vim
Normal file
26
.vim/bundle/syntastic/syntax_checkers/cpp/flawfinder.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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', {
|
||||
|
48
.vim/bundle/syntastic/syntax_checkers/d/dscanner.vim
Normal file
48
.vim/bundle/syntastic/syntax_checkers/d/dscanner.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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:
|
@@ -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'
|
||||
|
@@ -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()),
|
||||
|
@@ -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 =
|
||||
|
@@ -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({
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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,' .
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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 %#,'.
|
||||
|
@@ -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,' .
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
25
.vim/bundle/syntastic/syntax_checkers/html/stylelint.vim
Normal file
25
.vim/bundle/syntastic/syntax_checkers/html/stylelint.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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 : '') .
|
||||
|
@@ -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 =
|
||||
|
@@ -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
|
||||
|
@@ -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))
|
||||
|
@@ -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({
|
||||
|
@@ -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,' .
|
||||
|
51
.vim/bundle/syntastic/syntax_checkers/julia/lint.vim
Normal file
51
.vim/bundle/syntastic/syntax_checkers/julia/lint.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
23
.vim/bundle/syntastic/syntax_checkers/less/stylelint.vim
Normal file
23
.vim/bundle/syntastic/syntax_checkers/less/stylelint.vim
Normal 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:
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user