github.com/rogpeppe/clock@v0.0.0-20190514195947-2896927a307a/Makefile (about)

     1  PROJECT := github.com/juju/clock
     2  
     3  .PHONY: check-licence check-go check
     4  
     5  check: check-licence check-go
     6  	go test $(PROJECT)/...
     7  
     8  check-licence:
     9  	@(fgrep -rl "Licensed under the LGPLv3" --exclude *.s .;\
    10  		fgrep -rl "MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT" --exclude *.s .;\
    11  		find . -name "*.go") | sed -e 's,\./,,' | sort | uniq -u | \
    12  		xargs -I {} echo FAIL: licence missed: {}
    13  
    14  check-go:
    15  	$(eval GOFMT := $(strip $(shell gofmt -l .| sed -e "s/^/ /g")))
    16  	@(if [ x$(GOFMT) != x"" ]; then \
    17  		echo go fmt is sad: $(GOFMT); \
    18  		exit 1; \
    19  	fi )
    20  	@(go tool vet -all -composites=false -copylocks=false .)