minor test cleanup; add "make stats" target to run cloc against project

This commit is contained in:
swaits committed 2015-02-15 16:19:58 -08:00
1 parent 828d776b94
commit 8a6cac5df0
2 files changed
+5 -3

No files matched your search

+5 -2
View File
@@ -3,7 +3,7 @@
# derived from: http://zduck.com/2014/go-project-structure-and-dependencies/
# build targets (which aren't files)
.PHONY: build fmt lint vet test autotest cover doc run clean env vendor
.PHONY: build fmt lint vet test autotest cover doc run clean env stats vendor
# configuration
APPNAME := docrawler
@@ -26,8 +26,8 @@ build: fmt lint vet
fmt:
go fmt ./src/...
# TODO golint is not accepting the "./src/..." for some reason (from within make)
lint:
# TODO golint is not accepting the "./src/..." for some reason (from within make)
golint ./src/${APPNAME}/*.go
vet:
@@ -55,6 +55,9 @@ clean:
env:
go env
stats:
cloc ./src
# vendor
# * wipes our vendor directory completely
# * fetches all packages in ${PACKAGES} (GOPATH hardcoded to vendor directory only)
-1
View File
@@ -77,7 +77,6 @@ func TestSimpleFetch(t *testing.T) {
// TestSimpleMap figures out the site map for the site in baseURL
func TestSimpleMap(t *testing.T) {
pages := docrawl(baseURL)
t.Log("pages = ", pages)
if len(pages) != 4 {
t.Logf("got %v, wanted %v\n", len(pages), 1)
t.Fatal("got wrong number of pages")