-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (38 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SHELL := /bin/bash
.PHONY: install generate fmt vet test testacc golangcilint tfproviderlint tflint terrafmtlint importfmtlint devcheck devchecknotest
default: install
install:
go mod tidy
go install .
generate:
go generate ./...
go fmt ./...
go vet ./...
fmt:
go fmt ./...
vet:
go vet ./...
test:
go test -parallel=4 ./...
testacc:
TF_ACC=1 go test ./... -timeout 10m -v -p 4 --count=1
devchecknotest: install golangcilint generate tfproviderlint tflint terrafmtlint importfmtlint
devcheck: devchecknotest testacc
golangcilint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout 5m ./internal/...
tfproviderlint:
go run github.com/bflad/tfproviderlint/cmd/tfproviderlintx \
-c 1 \
-AT001.ignored-filename-suffixes=_test.go \
-AT003=false \
-XAT001=false \
-XR004=false \
-XS002=false ./internal/...
tflint:
go run github.com/terraform-linters/tflint --recursive --disable-rule "terraform_required_providers" --disable-rule "terraform_required_version"
terrafmtlint:
find ./internal/acctest -type f -name '*_test.go' \
| sort -u \
| xargs -I {} go run github.com/katbyte/terrafmt -f fmt {} -v
importfmtlint:
go run github.com/pavius/impi/cmd/impi --local . --scheme stdThirdPartyLocal ./internal/...