-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
255 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
if exists("g:loaded_syntastic_makeprg_autoload") | ||
finish | ||
endif | ||
let g:loaded_syntastic_makeprg_autoload = 1 | ||
|
||
function! syntastic#makeprg#build(opts) | ||
let opts = copy(a:opts) | ||
|
||
if !has_key(opts, 'args') | ||
let opts['args'] = '' | ||
endif | ||
|
||
if !has_key(opts, 'subchecker') | ||
let opts['subchecker'] = '' | ||
endif | ||
|
||
let builder = s:MakeprgBuilder.New(opts['exe'], opts['args'], opts['subchecker']) | ||
return builder.makeprg() | ||
endfunction | ||
|
||
let s:MakeprgBuilder = {} | ||
|
||
function! s:MakeprgBuilder.New(exe, args, subchecker) | ||
let newObj = copy(self) | ||
let newObj._exe = a:exe | ||
let newObj._args = a:args | ||
let newObj._subchecker = a:subchecker | ||
return newObj | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.makeprg() | ||
return join([self.exe(), self.args(), self.fname()]) | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.exe() | ||
if self.optExists('exe') | ||
return {self.optName('exe')} | ||
endif | ||
|
||
return self._exe | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.args() | ||
if exists('g:syntastic_' . &ft . '_args') | ||
return g:syntastic_{&ft}_args | ||
endif | ||
|
||
return self._args | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.fname() | ||
return shellescape(expand("%")) | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.optExists(name) | ||
return exists(self.optName(a:name)) | ||
endfunction | ||
|
||
function! s:MakeprgBuilder.optName(name) | ||
let setting = "g:syntastic_" . &ft | ||
if !empty(self._subchecker) | ||
let setting .= '_' . self._subchecker | ||
endif | ||
return setting . '_' . a:name | ||
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"============================================================================ | ||
"File: dart.vim | ||
"Description: Figures out which dart syntax checker (if any) to load | ||
" from the dart directory. | ||
"Maintainer: Maksim Ryzhikov <rv.maksim 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. | ||
" | ||
"============================================================================ | ||
|
||
call SyntasticLoadChecker('dart') |
21 changes: 21 additions & 0 deletions
21
.vim/bundle/syntastic/syntax_checkers/dart/dart_analyzer.vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"============================================================================ | ||
"File: dart_analyzer.vim | ||
"Description: Dart syntax checker - using dart_analyzer | ||
"Maintainer: Maksim Ryzhikov <rv.maksim 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:syntastic_dart_analyzer_conf") | ||
let g:syntastic_dart_analyzer_conf = '' | ||
endif | ||
|
||
function! SyntaxCheckers_dart_GetLocList() | ||
let args = !empty(g:syntastic_dart_analyzer_conf) ? ' ' . g:syntastic_dart_analyzer_conf : '' | ||
let makeprg = 'dart_analyzer ' . shellescape(expand("%")) . args | ||
|
||
let errorformat = '%Efile:%f:%l:%c: %m' | ||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) | ||
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.