@@ -21,21 +21,15 @@ endif
21
21
test : # # Run unit tests.
22
22
go test $(TESTARGS ) $(PROVIDER_SRC_DIR )
23
23
24
- TFPROVIDERLINTX_CHECKS = -XAT001=false -XR003=false -XS002=false
25
-
26
- fmt : tool-golangci-lint tool-tfproviderlintx tool-terraform tool-shfmt # # Format files and fix issues.
24
+ fmt : tool-golangci-lint tool-terraform tool-shfmt tfproviderlint-plugin # # Format files and fix issues.
27
25
gofmt -w -s .
28
26
$(GOBIN ) /golangci-lint run --fix
29
- $(GOBIN ) /tfproviderlintx $(TFPROVIDERLINTX_CHECKS ) --fix ./...
30
27
$(GOBIN ) /terraform fmt -recursive -list ./examples
31
28
$(GOBIN ) /shfmt -l -s -w ./examples
32
29
33
- lint-golangci : tool-golangci-lint # # Run golangci-lint linter (same as fmt but without modifying files).
30
+ lint-golangci : tool-golangci-lint tfproviderlint-plugin # # Run golangci-lint linter (same as fmt but without modifying files).
34
31
$(GOBIN ) /golangci-lint run
35
32
36
- lint-tfprovider : tool-tfproviderlintx # # Run tfproviderlintx linter (same as fmt but without modifying files).
37
- $(GOBIN ) /tfproviderlintx $(TFPROVIDERLINTX_CHECKS ) ./...
38
-
39
33
lint-examples-tf : tool-terraform # # Run terraform linter on examples (same as fmt but without modifying files).
40
34
$(GOBIN ) /terraform fmt -recursive -check ./examples
41
35
@@ -73,7 +67,7 @@ testacc-down: ## Teardown a GitLab instance.
73
67
docker-compose down --volumes
74
68
75
69
testacc : # # Run acceptance tests against a GitLab instance.
76
- TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN ) GITLAB_BASE_URL=$(GITLAB_BASE_URL ) go test -v $(PROVIDER_SRC_DIR ) $(TESTARGS ) -timeout 40m -tags acceptance
70
+ TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN ) GITLAB_BASE_URL=$(GITLAB_BASE_URL ) go test -v $(PROVIDER_SRC_DIR ) $(TESTARGS ) -timeout 40m
77
71
78
72
certs : # # Generate certs for the GitLab container registry
79
73
mkdir -p certs
@@ -85,9 +79,6 @@ certs: ## Generate certs for the GitLab container registry
85
79
tool-golangci-lint :
86
80
@$(call install-tool, github.com/golangci/golangci-lint/cmd/golangci-lint)
87
81
88
- tool-tfproviderlintx :
89
- @$(call install-tool, github.com/bflad/tfproviderlint/cmd/tfproviderlintx)
90
-
91
82
tool-tfplugindocs :
92
83
@$(call install-tool, github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs)
93
84
@@ -110,4 +101,7 @@ tool-terraform:
110
101
@[ -f $( GOBIN) /terraform ] || { mkdir -p tmp; cd tmp; rm -rf terraform; git clone --branch $( TERRAFORM_VERSION) --depth 1 https://github.com/hashicorp/terraform.git; cd terraform; GOBIN=$( GOBIN) go install; cd ..; rm -rf terraform; }
111
102
112
103
clean : testacc-down
113
- @rm -rf certs/
104
+ @rm -rf certs/
105
+
106
+ tfproviderlint-plugin :
107
+ @cd tools && go build -buildmode=plugin -o $(GOBIN ) /tfproviderlint-plugin.so ./cmd/tfproviderlint-plugin
0 commit comments