1" Copyright 2013 The Go Authors. All rights reserved.
2" Use of this source code is governed by a BSD-style
3" license that can be found in the LICENSE file.
4"
5" lint.vim: Vim command to lint Go files with golint.
6"
7"   https://github.com/golang/lint
8"
9" This filetype plugin add a new commands for go buffers:
10"
11"   :Lint
12"
13"       Run golint for the current Go file.
14"
15if exists("b:did_ftplugin_go_lint")
16    finish
17endif
18
19if !executable("golint")
20    finish
21endif
22
23command! -buffer Lint call s:GoLint()
24
25function! s:GoLint() abort
26    cexpr system('golint ' . shellescape(expand('%')))
27endfunction
28
29let b:did_ftplugin_go_lint = 1
30
31" vim:ts=4:sw=4:et
32