summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim')
-rw-r--r--src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim b/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim
new file mode 100644
index 00000000000..7dffd181767
--- /dev/null
+++ b/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/misc/vim/ftplugin/go/lint.vim
@@ -0,0 +1,31 @@
+" Copyright 2013 The Go Authors. All rights reserved.
+" Use of this source code is governed by a BSD-style
+" license that can be found in the LICENSE file.
+"
+" lint.vim: Vim command to lint Go files with golint.
+"
+" https://github.com/golang/lint
+"
+" This filetype plugin add a new commands for go buffers:
+"
+" :Lint
+"
+" Run golint for the current Go file.
+"
+if exists("b:did_ftplugin_go_lint")
+ finish
+endif
+
+if !executable("golint")
+ finish
+endif
+
+command! -buffer Lint call s:GoLint()
+
+function! s:GoLint() abort
+ cexpr system('golint ' . shellescape(expand('%')))
+endfunction
+
+let b:did_ftplugin_go_lint = 1
+
+" vim:ts=4:sw=4:et