gometalinter检查golang代码,这是什么意思?

使用goland,设置了gometalinter检查代码,下面是什么意思?

D:\workspace\www\go_work\bin\gometalinter.exe --vendor --fast --enable-gc --tests --aggregate --disable=gotype D:\workspace\www\go_work\src\apiserver\model
WARNING: exec: "goconst": executable file not found in %PATH%
WARNING: exec: "gocyclo": executable file not found in %PATH%
WARNING: exec: "gosec": executable file not found in %PATH%
WARNING: exec: "gotype": executable file not found in %PATH%
WARNING: exec: "ineffassign": executable file not found in %PATH%
WARNING: exec: "golint": executable file not found in %PATH%

Process finished with exit code 2
阅读 3.7k
2 个回答

就是说命令文件 goconst 在环境变量 PATH 中找不到。
你要把 GOBIN 加入在 PATH 中。

IDE在编译的时候设置把编码路径设置到你go_work目录,goland/eclipse设置Run/Debug Configurations的Working directory为go_work目录,OutputDiretory设置为gobin目录,一般为/path/go/src/bin

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题