github.com/hashicorp/terraform-plugin-sdk@v1.17.2/Makefile (about)

     1  GOFMT_FILES?=$$(find . -name '*.go')
     2  
     3  default: test
     4  
     5  test: fmtcheck generate
     6  	go test ./...
     7  
     8  generate:
     9  	go generate ./...
    10  
    11  # We separate the protobuf generation because most development tasks on
    12  # Terraform do not involve changing protobuf files and protoc is not a
    13  # go-gettable dependency and so getting it installed can be inconvenient.
    14  #
    15  # If you are working on changes to protobuf interfaces you may either use
    16  # this target or run the individual scripts below directly.
    17  protobuf:
    18  	bash scripts/protobuf-check.sh
    19  	bash internal/tfplugin5/generate.sh
    20  
    21  fmt:
    22  	gofmt -s -w $(GOFMT_FILES)
    23  
    24  fmtcheck:
    25  	@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
    26  
    27  .PHONY: default fmt fmtcheck generate test