finding bugs in Go code

403 views
Skip to first unread message

Russ Cox

unread,
Feb 14, 2013, 3:00:36 PM2/14/13
to golang-nuts
It might be useful to write a program to go through public Go repositories (both the main Go one but also, perhaps even more so, other public projects) and extract changes that, excluding modifications in comments and in *_test.go files, only amount to <= n lines. (A good starting value of n might be 2 or 3.) A significant fraction of such changes are likely to be simple bug fixes, and from looking at the bugs we might discover common mistakes worth checking in 'go vet'. Credit to Bill Pugh for the idea.

Anyone interested?

Russ

Brendan Tracey

unread,
Feb 14, 2013, 3:16:15 PM2/14/13
to golan...@googlegroups.com
I think it is a great idea, though I don't know I could contribute. I would like to suggest you make a plug for go vet either in "Effective go" or in "How to write go code"

si guy

unread,
Feb 14, 2013, 11:31:09 PM2/14/13
to golan...@googlegroups.com
Wouldn't it be nice if go vet could hook into hg or git and analyze the revisions automatically... Learning by itself what the common mistakes are. I wonder how hard that would be to accomplish. It seems like an ai problem, but there could be some straightforward way to extract rules for a set of common changes, especially in relation to API usage.
Reply all
Reply to author
Forward
0 new messages