Permalink
Browse files

Linter fixups (#1197)

* gogo/proto->golang/proto

* assignOp +=

* golangci-lint automatically ignores generated files

* Shrink exclude list

* bump linter version

* remove wrong log
  • Loading branch information...
gdbelvin committed Feb 8, 2019
1 parent 5487dfb commit 25eae20d17661fcdd4dc86e88307d38ac88eac28
Showing with 12 additions and 12 deletions.
  1. +7 −6 .golangci.yml
  2. +1 −1 .travis.yml
  3. +1 −2 cmd/gen-test-vectors/main.go
  4. +1 −1 core/client/multi/writer.go
  5. +1 −1 core/crypto/tinkio/pem.go
  6. +1 −1 core/crypto/tinkio/protofile.go
@@ -1,8 +1,3 @@
run:
skip-file:
- ".+\\.pb\\.go"
- ".+\\.pb\\.gw\\.go"

linters-settings:
govet:
check-shadowing: false
@@ -17,6 +12,12 @@ linters-settings:
min-occurrences: 3
misspell:
locale: US
depguard:
list-type: blacklist
packages:
- golang.org/x/net/context
- github.com/gogo/protobuf/proto
- github.com/google/martian/log

linters:
enable-all: true
@@ -30,4 +31,4 @@ linters:

issues:
exclude:
- .((os\.)?std(out|err)\..*|.*Close|.*Flush|.*Write|.*Serve|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv).
- .(.*Write|.*Serve).
@@ -34,7 +34,7 @@ before_install:

install:
- gcloud -q components install kubectl
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.13.1
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.13.2
- go get -t ./...

script:
@@ -31,7 +31,6 @@ import (
"github.com/google/keytransparency/core/testutil"
"github.com/google/keytransparency/impl/authentication"
"github.com/google/keytransparency/impl/integration"
"github.com/google/martian/log"
"github.com/google/tink/go/tink"
"github.com/google/trillian/types"

@@ -89,7 +88,7 @@ func GenerateTestVectors(ctx context.Context, env *integration.Env) error {
MaxBatch: 100,
}
if _, err := env.Sequencer.RunBatch(ctx, req); err != nil {
log.Errorf("RunBatch(): %v", err)
glog.Errorf("RunBatch(): %v", err)
}
})
}()
@@ -48,7 +48,7 @@ func (m *writer) Write(p []byte) (n int, err error) {
for _, w := range m.writers {
n, err = w.Write(p)
if err != nil {
multiError = multiError + fmt.Sprintf("%v bytes written to %v: %v", n, w, err)
multiError += fmt.Sprintf("%v bytes written to %v: %v", n, w, err)
}
minBytesWritten = min(n, minBytesWritten)
}
@@ -20,7 +20,7 @@ import (
"errors"
"fmt"

"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/proto"
"github.com/google/tink/go/signature"
"github.com/google/tink/go/testutil"
"github.com/google/tink/go/tink"
@@ -5,7 +5,7 @@ import (
"fmt"
"io/ioutil"

"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/proto"

tinkpb "github.com/google/tink/proto/tink_go_proto"
)

0 comments on commit 25eae20

Please sign in to comment.