Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Integration #47

Merged
merged 5 commits into from
Dec 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: go
go:
- "1.9"
install:
- make install-ci
script:
- make ci

4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@

GO_FILES := $(shell git ls-files | grep "\.go$$")

PACKAGES := $(shell find $(GO_FILES) | xargs -n1 dirname | sed 's:^:./:'| uniq)

.PHONY: test
test:
go test ./...

.PHONY: gofmt
gofmt:
gofmt -e -s -l $(GO_FILES)

.PHONY: govet
govet:
go vet ./...

.PHONY: golint
golint:
golint $(PACKAGES)

.PHONY: errcheck
errcheck:
errcheck -ignoretests $(PACKAGES)

.PHONY: lint
lint: gofmt govet golint errcheck

.PHONY: install
install:
dep ensure

.PHONY: install-ci
install-ci:
go get -u github.com/golang/dep/cmd/dep github.com/golang/lint/golint github.com/kisielk/errcheck
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI choked on curly brace expansion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably posix sh vs bash-ism fwiw

dep ensure

.PHONY: ci
ci: test lint

run/%: proofs/%
go run $(shell find $< -maxdepth 1 -name *.go -not -name *_test.go)

Expand Down
2 changes: 1 addition & 1 deletion internal/cops/braille/braille.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Draw(dst *display.Display, r image.Rectangle, src image.Image, sp image.Poi
DrawBitmap(dst, r, bits, sp, on)
}

// DrawBitmap
// DrawBitmap FIXME
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressing this down the stack in #44

func DrawBitmap(dst *display.Display, r image.Rectangle, src BitmapReader, sp image.Point, fg color.Color) {
w, h := r.Dx(), r.Dy()
for y := 0; y < h; y++ {
Expand Down
Loading