我在我的项目上本地运行以下命令
gometalinter --config=gometalinter.json ./...
一开始我遇到了一些错误,我都修复了!
现在我在Travis
脚本中运行相同的命令 exaclty 我得到了供应商错误
vendor/github.com/spf13/viper/flags.go:3:8:warning: error return value not checked (could not import github.com/spf13/pflag (go/build: importGo github.com/spf13/pflag: exit status 1) (errcheck)
vendor/github.com/spf13/viper/viper.go:42:7:warning: error return value not checked (could not import github.com/pelletier/go-toml (go/build: importGo github.com/pelletier/go-toml: exit status 1) (errcheck)
这是gometalinter.json
用于配置
{
"vendor": true,
"Deadline": "2m",
"Sort": [
"linter",
"severity"
],
"DisableAll": true,
"Enable": [
"gotypex",
"vetshadow",
"errcheck",
"gocyclo",
"vet",
"golint",
"vetshadow",
"ineffassign",
],
"Cyclo": 10,
"LineLength": 120
}
我不明白为什么在本地我没有收到此错误(我有供应商回购)以及为什么它要求供应商错误?可能是什么原因 ?