github.com/moznion/go-optional@v0.11.1-0.20240312043125-6881072e44c1/Makefile (about)

     1  .PHONY: check ci-check test fmt fmt-check lint
     2  
     3  check: fmt-check lint test
     4  ci-check: fmt-check test
     5  
     6  test:
     7  	go test ./... -race -v -coverprofile="coverage.txt" -covermode=atomic
     8  
     9  fmt:
    10  	gofmt -w -s *.go && goimports -w *.go
    11  
    12  fmt-check:
    13  	goimports -l *.go | grep [^*][.]go$$; \
    14  		EXIT_CODE=$$?; \
    15  		if [ $$EXIT_CODE -eq 0 ]; then exit 1; fi \
    16  
    17  lint:
    18  	golangci-lint run ./...
    19