Static Code Analysis (linter) tool for Go language
Golint is newly released this week: https://github.com/golang/lint
Here are three related tools that you might want to look at. You will see how to parse and analyze Go source code.
govet
gofix
gofmt
There are a whole bunch of linters with varying types of output. Some include column offsets, some don't include any context, etc.
I've written a tool called gometalinter that installs, runs and normalises the output of all the ones I'm aware of:
- 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)
- go vet
If there are any linters missing I'd love to add them.
There's also a SublimeLinter plugin for it.