11default : build
22
3- test :
3+ test : lint
44 @echo " ==> Running tests..."
55 @gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=coverage.txt ./...
66
@@ -26,35 +26,40 @@ coverage-int: int
2626
2727int-build : int build
2828
29- build : lint test fmt
29+ build : lint test
3030 @echo " ==> Building source code with go build..."
3131 @go build -mod vendor -v -o terraform-provider-databricks
3232
3333lint :
34- @echo " ==> Linting source code with golangci-lint..."
35- @golangci-lint run --skip-dirs-use-default --timeout 5m --build-tags=azure
36- @golangci-lint run --skip-dirs-use-default --timeout 5m --build-tags=aws
34+ @echo " ==> Linting source code with golangci-lint make sure you run make fmt ..."
35+ @golangci-lint run --skip-dirs-use-default --timeout 5m
3736
38- fmt : lint
37+ fmt :
3938 @echo " ==> Formatting source code with gofmt..."
39+ @goimports -w client
40+ @goimports -w databricks
41+ @goimports -w main.go
42+ @gofmt -s -w client
43+ @gofmt -s -w databricks
44+ @gofmt -s -w main.go
4045 @go fmt ./...
4146
4247vendor :
4348 @echo " ==> Filling vendor folder with library code..."
4449 @go mod vendor
4550
4651# INTEGRATION TESTING WITH AZURE
47- terraform-acc-azure : fmt
52+ terraform-acc-azure : lint
4853 @echo " ==> Running Terraform Acceptance Tests for Azure..."
4954 @CLOUD_ENV=" azure" TF_ACC=1 gotestsum --format short-verbose --raw-command go test -v -json -tags=azure -short -coverprofile=coverage.out ./...
5055
5156# INTEGRATION TESTING WITH AWS
52- terraform-acc-aws : fmt
57+ terraform-acc-aws : lint
5358 @echo " ==> Running Terraform Acceptance Tests for AWS..."
5459 @CLOUD_ENV=" aws" TF_ACC=1 gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=coverage.out -run ' TestAccAws' ./...
5560
5661# INTEGRATION TESTING WITH AWS
57- terraform-acc-mws : fmt
62+ terraform-acc-mws : lint
5863 @echo " ==> Running Terraform Acceptance Tests for Multiple Workspace APIs on AWS..."
5964 @/bin/bash integration-environment-mws/run.sh
6065
0 commit comments