Commit Graph

6 Commits (3465f6727b97d351e19f6619a7cffa40468fef96)

Author SHA1 Message Date
Richard van der Hoff c3cb6f8767 Update gometalinter, and disable gas (#371)
* Update gometalinter

* Disable gas linter

According to the gas github page:

> Gas is still in alpha and accepting feedback from early adopters. We do not
> consider it production ready at this time.

Generally it seems to shout about a lot of things which aren't very errory,
like executing subprocesses with anything other than a hardcoded commandline,
and creating directories with anything other than 700 perms.
2017-12-08 19:13:17 +00:00
Erik Johnston 561315e1d6
Add gofmt linter (#339)
* Check that gofmt has been run

* gofmt files

* Tabs and spaces
2017-11-16 10:12:02 +00:00
Richard van der Hoff 8fff0e887c Update gometalinter config (#331)
* Update gometalinter config

gometalinter now uses `maligned` instead of `aligncheck`
(https://github.com/alecthomas/gometalinter/pull/367), so we need to update our
config accordingly.

* Update gometalinter

* Disable gotype linter

gotype does not seem to play nicely with the gb vendor directory. In
particular, it wants each of our dependencies to be built and installed (see
https://github.com/golang/go/issues/10969), but (empirically) it will not
accept them being installed in `pkg` but insists on them being in `vendor/pkg`.

This presents a problem because `gb build` builds the packages into `pkg`
(which doesn't seem entirely unreasonable since `.` comes before `vendor` in
`$GOPATH`). `go install github.com/x/y` does install in `vendor/pkg` but
requires us to know the name of each package.

The general conclusion of https://github.com/alecthomas/gometalinter/issues/91
seems to have been that the easiest thing to do is to disable `gotype` for now.

* Fix `unparam` lint

* Fix goshadow lint
2017-11-15 10:25:48 +00:00
Erik Johnston 7a30f2085a Add goconst linter (#246) 2017-09-20 15:25:25 +01:00
Erik Johnston b72142ace5 Add vet linter (#240) 2017-09-20 13:40:22 +01:00
Erik Johnston 8a36a7e89b Add errcheck linter (#238)
* Add errcheck linter

* Add config for 'fast' linters

* Fix errcheck lint stuff

* Fix errcheck lint
2017-09-20 10:59:19 +01:00