Skip to content

Commit

Permalink
Added gosimple
Browse files Browse the repository at this point in the history
- Get gosimple package
- Updated staticcheck's URL
- Moved build and above checks in `before_script` section to fail fast
- Fixed reports from gosimple
  • Loading branch information
kozlovic committed Jan 25, 2017
1 parent 0d45f49 commit 1fb9f21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ install:
- go get github.com/nats-io/go-nats
- go get github.com/mattn/goveralls
- go get github.com/wadey/gocovmerge
- go get honnef.co/go/staticcheck/cmd/staticcheck
script:
- go get honnef.co/go/tools/cmd/staticcheck
- go get honnef.co/go/tools/cmd/gosimple
before_script:
- EXCLUDE_VENDOR=$(go list ./... | grep -v "/vendor/")
- go build
- go fmt ./...
- go vet $EXCLUDE_VENDOR
- gosimple $EXCLUDE_VENDOR
- staticcheck -ignore "$(cat staticcheck.ignore)" $EXCLUDE_VENDOR
script:
- go test -i -race $EXCLUDE_VENDOR
- go test -v -race $EXCLUDE_VENDOR
after_success:
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func TestWriteDeadline(t *testing.T) {
t.Fatalf("Error on publish: %v", err)
}
}
dur := time.Now().Sub(start)
dur := time.Since(start)
// user more than the write deadline to account for calls
// overhead, running with -race, etc...
if dur > 100*time.Millisecond {
Expand Down
5 changes: 1 addition & 4 deletions server/sublist.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,5 @@ func matchLiteral(literal, subject string) bool {
li++
}
// Make sure we have processed all of the literal's chars..
if li < ll {
return false
}
return true
return li >= ll
}

0 comments on commit 1fb9f21

Please sign in to comment.