Vim-go: Metalinter vs. GoVet

Created on 20 Oct 2017  路  6Comments  路  Source: fatih/vim-go

What did you do? (required. The issue will be closed when not provided.)

  1. Call :GoMetaLinter inside a go file
  2. Call :GoVet inside the same go file

Please provide a recipe to replicate your problem with a minimal vimrc with all plugins other than vim-go disabled.

What did you expect to happen?

  1. vet, golint, and errcheck to be run
  2. vet to be run again

What happened instead?

  1. golint offers suggestions, errcheck appears not to produce any errors, and the bottom of the quickfix window says: || WARING: exec: "govet": executable file not found in $PATH
  2. [vet] PASS

Best guess is it meant to run go vet, two words, and somehow they got smashed together.

Configuration

  • vim version (major, minor, and included patches from :version):
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct  5 2017 19:20:19)
MacOS X (unix) version
Included patches: 1-1175
Compiled by Homebrew
  • vim-go version: 1.15 according to changelog
  • go version (go version): 1.9.1 darwin
  • operating system: Mac OS X
  • vimrc you used to reproduce:

I couldn't get a full reproduce, as a minimal project gave me the following results instead:

  1. MetaLinter had errors
  2. [vet] FAIL

vimrc:

set nocompatible
filetype indent plugin on
syntax on
set rtp+=~/.vim/bundle/vim-go
bug

Most helpful comment

Somehow gometalinter decided to run govet instead of go vet. Both are different tools. If you do gometalinter --install from your terminal it'll fix it. I think we should add now govet to :GoInstallBinaries. This is the third time people asked this to me.

All 6 comments

Somehow gometalinter decided to run govet instead of go vet. Both are different tools. If you do gometalinter --install from your terminal it'll fix it. I think we should add now govet to :GoInstallBinaries. This is the third time people asked this to me.

Seems like they even forked go tool vet to add some functionality.

Adding it to binaries is probably a good idea, since it won't cause unexpected failures like above. Thanks for the quick reply!

We could maybe also run gometalinter --install with :Go{Install,Update}Binaries ?

See: #1555

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrejvanderzee picture andrejvanderzee  路  3Comments

svanharmelen picture svanharmelen  路  3Comments

zhangjing picture zhangjing  路  3Comments

surest picture surest  路  3Comments

MattFlower picture MattFlower  路  4Comments