github.com/hellobchain/third_party@v0.0.0-20230331131523-deb0478a2e52/ldap.v2/Makefile (about)

     1  .PHONY: default install build test quicktest fmt vet lint 
     2  
     3  default: fmt vet lint build quicktest
     4  
     5  install:
     6  	go get -t -v ./...
     7  
     8  build:
     9  	go build -v ./...
    10  
    11  test:
    12  	go test -v -cover ./...
    13  
    14  quicktest:
    15  	go test ./...
    16  
    17  # Capture output and force failure when there is non-empty output
    18  fmt:
    19  	@echo gofmt -l .
    20  	@OUTPUT=`gofmt -l . 2>&1`; \
    21  	if [ "$$OUTPUT" ]; then \
    22  		echo "gofmt must be run on the following files:"; \
    23  		echo "$$OUTPUT"; \
    24  		exit 1; \
    25  	fi
    26  
    27  # Only run on go1.5+
    28  vet:
    29  	go tool vet -atomic -bool -copylocks -nilfunc -printf -shadow -rangeloops -unreachable -unsafeptr -unusedresult .
    30  
    31  # https://github.com/golang/lint
    32  # go get github.com/golang/lint/golint
    33  # Capture output and force failure when there is non-empty output
    34  # Only run on go1.5+
    35  lint:
    36  	@echo golint ./...
    37  	@OUTPUT=`golint ./... 2>&1`; \
    38  	if [ "$$OUTPUT" ]; then \
    39  		echo "golint errors:"; \
    40  		echo "$$OUTPUT"; \
    41  		exit 1; \
    42  	fi