This commit is contained in:
Barak Michener 2024-05-18 18:50:38 -07:00
parent f0510126ba
commit 7a7c647c22
212 changed files with 30625 additions and 30625 deletions

View file

@ -0,0 +1,42 @@
"============================================================================
"File: golintc.vim
"Description: Check go syntax using 'golintc'
"Maintainer: Hiroshi Ioka <hirochachacha@gmail.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_go_golintc_checker")
finish
endif
let g:loaded_syntastic_go_golintc_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_golintc_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat =
\ '%f:%l:%c: %m,' .
\ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'type': 'w'},
\ 'subtype': 'Style' })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'go',
\ 'name': 'golintc'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View file

@ -0,0 +1,49 @@
"============================================================================
"File: gonyet.vim
"Description: Perform static analysis of Go code with the go-nyet tool
"Maintainer: Barak Michener <me@barakmich.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_go_gonyet_checker")
finish
endif
let g:loaded_syntastic_go_gonyet_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_gonyet_IsAvailable() dict
return executable('go-nyet')
endfunction
function! SyntaxCheckers_go_gonyet_GetLocList() dict
let makeprg = 'go-nyet ' . expand('%:p')
let errorformat = '%f:%l:%c:%m'
" The go compiler needs to either be run with an import path as an
" argument or directly from the package directory. Since figuring out
" the proper import path is fickle, just cwd to the package.
let errors = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h'),
\ 'defaults': {'type': 'w'} })
return errors
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'go',
\ 'name': 'gonyet'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View file

@ -0,0 +1,52 @@
"============================================================================
"File: govetshadow.vim
"Description: Perform static analysis of Go code with the vet tool
"Maintainer: Kamil Kisiel <kamil@kamilkisiel.net>
"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_go_govetshadow_checker")
finish
endif
let g:loaded_syntastic_go_govetshadow_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_go_govetshadow_IsAvailable() dict
return executable(self.getExec())
endfunction
function! SyntaxCheckers_go_govetshadow_GetLocList() dict
let makeprg = self.getExec() . ' tool vet -shadow ' . expand('%:p')
let errorformat =
\ '%Evet: %.%\+: %f:%l:%c: %m,' .
\ '%W%f:%l: %m,' .
\ '%-G%.%#'
" The go compiler needs to either be run with an import path as an
" argument or directly from the package directory. Since figuring out
" the proper import path is fickle, just cwd to the package.
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'cwd': expand('%:p:h', 1),
\ 'defaults': {'type': 'w'} })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'go',
\ 'name': 'govetshadow',
\ 'exec': 'go' })
let &cpo = s:save_cpo
unlet s:save_cpo
"