Skip to content

Commit

Permalink
Add analysis error message for code not gofmt'd (#204)
Browse files Browse the repository at this point in the history
What
===
Add analysis error message for code not formatted with gofmt.

Why
===
The check existed but it didn't output any meaningful text.
  • Loading branch information
leighmcculloch committed Dec 23, 2017
1 parent 20cea76 commit 0f74dcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -12,7 +12,8 @@ integration:
analysis:
diff -u <(echo -n) <(go list -f '{{range .TestGoFiles}}{{$$.ImportPath}}/{{.}}{{end}}' ./...) \
|| (exit_code=$$?; echo -e '\033[31mTest files should be marked with a unit or integration build tag.\033[0m'; exit $$exit_code)
diff -u <(echo -n) <(gofmt -d .)
diff -u <(echo -n) <(gofmt -d .) \
|| (exit_code=$$?; echo -e '\033[31mRun gofmt to format source files.\033[0m'; exit $$exit_code)
go vet ./...
go get github.com/kisielk/errcheck && CGO_ENABLED=0 errcheck ./...

Expand Down

0 comments on commit 0f74dcf

Please sign in to comment.