Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Switch to new linter
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Jun 19, 2019
1 parent 054b069 commit 8d014d8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
9 changes: 9 additions & 0 deletions .golangci.toml
@@ -0,0 +1,9 @@
[output]
format = "colored-line-number"

[linters]
enable = [
"interfacer", "gocyclo", "unconvert", "goimports", "unused", "varcheck",
"vetshadow", "misspell", "nakedret", "errcheck", "golint", "ineffassign",
"deadcode", "goconst", "vet", "unparam", "gofmt"
]
6 changes: 0 additions & 6 deletions .linter.json

This file was deleted.

7 changes: 0 additions & 7 deletions .linter_test.json

This file was deleted.

3 changes: 1 addition & 2 deletions travis/install.sh
Expand Up @@ -18,8 +18,7 @@ case "$1" in
generate
;;
"linter")
go get -u gopkg.in/alecthomas/gometalinter.v1
gometalinter.v1 --install
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
;;
"coverage")
generate
Expand Down
5 changes: 1 addition & 4 deletions travis/test.sh
Expand Up @@ -15,10 +15,7 @@ case "$1" in
gopherjs test $(go list ./... | grep -v /vendor/ | grep -Ev 'kivik/(serve|auth|proxy)')
;;
"linter")
diff -u <(echo -n) <(gofmt -e -d $(find . -type f -name '*.go' -not -path "./vendor/*"))
go install # to make gotype (run by gometalinter) happy
gometalinter.v1 --config .linter_test.json
gometalinter.v1 --config .linter.json
golangci-lint run ./...
;;
"coverage")
echo "" > coverage.txt
Expand Down

0 comments on commit 8d014d8

Please sign in to comment.