Skip to content

Commit

Permalink
Collect test stati and report after checking all packages (gopasspw#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschulz authored Jun 16, 2017
1 parent 796ed20 commit b2e2193
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ lint:
@which golint > /dev/null; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/golang/lint/golint; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
STATUS=0; for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || STATUS=1; done; exit $$STATUS

.PHONY: errcheck
errcheck:
@which errcheck > /dev/null; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/kisielk/errcheck; \
fi
for PKG in $(PACKAGES); do errcheck $$PKG || exit 1; done;
STATUS=0; for PKG in $(PACKAGES); do errcheck $$PKG || STATUS=1; done; exit $$STATUS

.PHONY: megacheck
megacheck:
@which megacheck > /dev/null; if [ $$? -ne 0 ]; then \
$(GO) get -u honnef.co/go/tools/cmd/megacheck; \
fi
for PKG in $(PACKAGES); do megacheck $$PKG || exit 1; done;
STATUS=0; for PKG in $(PACKAGES); do megacheck $$PKG || STATUS=1; done; exit $$STATUS

.PHONY: test
test:
for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
STATUS=0; for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || STATUS=1; done; exit $$STATUS

.PHONY: test-integration
test-integration: clean build
Expand Down
6 changes: 3 additions & 3 deletions qrcon/qrcon.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ func QRCode(content string) (string, error) {
for y := b.Min.Y; y < b.Max.Y; y++ {
col := i.At(x, y)
if sameColor(col, q.ForegroundColor) {
buf.WriteString(black)
_, _ = buf.WriteString(black)
} else if sameColor(col, q.BackgroundColor) {
buf.WriteString(white)
_, _ = buf.WriteString(white)
} else {
return "", fmt.Errorf("Unexpected color at (%d,%d): %+v", x, y, col)
}
}
buf.WriteString("\n")
_, _ = buf.WriteString("\n")
}
return buf.String(), nil
}
Expand Down

0 comments on commit b2e2193

Please sign in to comment.