some tests and major cleanup

This commit is contained in:
ston1th 2018-10-19 23:08:32 +02:00
commit 16671b3406
30 changed files with 192057 additions and 202431 deletions

View file

@ -10,13 +10,19 @@ all: $(PROGRAM)
setup:
$(CC) get github.com/client9/misspell
vendor: clean codeqa
CGO_ENABLED=0 $(CC) $(BUILD) -mod=vendor $(LDFLAGS)
$(PROGRAM): clean codeqa
CGO_ENABLED=0 $(CC) $(BUILD) $(LDFLAGS)
clean:
$(CC) clean -x
codeqa: templates gofmt misspell golint
codeqa: generate gofmt misspell golint test
generate:
$(CC) generate
gofmt:
gofmt -w .
@ -25,9 +31,14 @@ golint:
$(GOPATH)/bin/golint .
misspell:
# ignore misspellings from vendor/
$(GOPATH)/bin/misspell -i functionallity,avaliable,HALP,halp,agains,becuase,Christiaan,compatiblity,conjuction,frequence,inital,inot,occurance,overriden,pervious,preceeded,preceeds,precendence,PROPOGATE,reamining,represenation,soley,substract,supression,whcih,preceed *
templates:
$(CC) generate
test:
ifeq ($(shell go env GOARCH), $(shell go env GOHOSTARCH))
$(CC) test ./...
else
$(info skipping tests of other platforms)
endif
.PHONY: setup build clean templates gofmt misspell golint
.PHONY: setup vendor build clean codeqa generate gofmt golint misspell test