[ANN] golint, a linter for Go source code

594 views
Skip to first unread message

David Symonds

unread,
Jun 3, 2013, 12:21:31 AM6/3/13
to golang-nuts, Rob Pike
I open sourced golint today:

$ go get github.com/golang/lint/golint
$ golint something.go

Note that we aren't soliciting contributions, since we want golint to
be conservative and highly accurate, and only prescriptive on matters
of style that are already strongly established in the Go standard
library. However, if you find a style mistake that programmers
regularly make, and you believe it to be against an established style,
send some mail to suggest that golint flag it, or file an issue at
https://github.com/golang/lint/issues.


From the README:
golint is a linter for Go source code.

Invoke golint with one or more filenames.
The output of this tool is a list of suggestions in Vim quickfix format,
which is accepted by lots of different editors.

golint differs from govet. govet is concerned with correctness, whereas
golint is concerned with coding style. golint is in use at Google, and it
seeks to match the accepted style of the open source Go project.

The suggestions made by golint are exactly that: suggestions.
golint is not perfect, and has both false positives and false negatives.
Do not treat its output as a gold standard. We will not be adding pragmas
or other knobs to suppress specific warnings, so do not expect or require
code to be completely "lint-free".
Unlimited effort will not be expended to make golint perfect.
It is considered an abuse of this tool to run it for machine consumption.

Ibrahim M. Ghazal

unread,
Jun 3, 2013, 12:28:18 AM6/3/13
to David Symonds, golang-nuts, Rob Pike
On Mon, Jun 3, 2013 at 7:21 AM, David Symonds <dsym...@golang.org> wrote:
> $ go get github.com/golang/lint/golint

I'm curious, being a project by The Go Authors, why Github instead of
Google Code?

Andrew Gerrand

unread,
Jun 3, 2013, 2:13:16 AM6/3/13
to Ibrahim M. Ghazal, David Symonds, golang-nuts, Rob Pike

On 3 June 2013 14:28, Ibrahim M. Ghazal <img...@gmail.com> wrote:
I'm curious, being a project by The Go Authors, why Github instead of
Google Code?

We're just experimenting with different workflows.

Andrew

Dobrosław Żybort

unread,
Jun 3, 2013, 3:28:11 AM6/3/13
to golan...@googlegroups.com, Rob Pike
Thank you for nice tool.

Did you check splint[1] first or it's completely new project?

[1]: http://github.com/stathat/splint

Best regards,
Dobrosław Żybort

David Symonds

unread,
Jun 3, 2013, 4:14:51 AM6/3/13
to Dobrosław Żybort, golan...@googlegroups.com, Rob Pike
On Mon, Jun 3, 2013 at 5:28 PM, Dobrosław Żybort <matr...@gmail.com> wrote:

> Did you check splint[1] first or it's completely new project?
>
> [1]: http://github.com/stathat/splint

It's completely different, and much more expansive.

Aaron France

unread,
Jun 3, 2013, 5:14:52 AM6/3/13
to David Symonds, Dobrosław Żybort, golang-nuts, Rob Pike
Hi,

I sent a pull request for scanning directories on github, let me know what you think, please.

Love the tool, btw,
Aaron



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages