Go语言的静态代码分析(linter)工具

Ahm*_*gle 21 static-analysis go

是否有去语般的静态分析工具lint,pylint等等?据我搜索,我没有找到任何相关的东西.

我可以在我所在部门担任本科高级项目.我必须确定以前没有这样做过.任何帮助表示赞赏.

dsy*_*nds 18

Golint本周新发布:https://github.com/golang/lint


pet*_*rSO 13

以下是您可能想要查看的三个相关工具.您将看到如何解析和分析Go源代码.

govet

gofix

gofmt


Ale*_*mas 9

有一大堆具有不同类型输出的短绒.一些包括列偏移,一些不包括任何上下文等.

我写了一个名为gometalinter的工具,它安装,运行并规范了我所知道的所有输出:

  • structcheck(github.com/opennota/check/cmd/structcheck)
  • golint(github.com/golang/lint/golint)
  • gotype(code.google.com/p/go.tools/cmd/gotype)
  • errcheck(github.com/kisielk/errcheck)
  • defercheck(github.com/opennota/check/cmd/defercheck)
  • varcheck(github.com/opennota/check/cmd/varcheck)
  • 去看兽医

如果有任何短缺,我很乐意添加它们.

还有一个SublimeLinter 插件.


Mat*_*tyW 7

在go(1.3)的最新版本中,godoc包含一些静态分析功能:

http://golang.org/lib/godoc/analysis/help.html


Von*_*onC 7

如果您想快速了解整个Go项目的状态,即使用各种静态分析工具:

你可以看看:

http://goreportcard.com

(来自http://gophergala.com)

它将检查GitHub仓库中这四个工具报告的任何问题.