Skip to content

Commit 42fb5ab

Browse files
authored
Merge pull request #65 from paulfantom/makefile
clean makefile
2 parents 18ca0d6 + ed05f7a commit 42fb5ab

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

Makefile

+14-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ else
1616
endif
1717

1818
.PHONY: check
19-
check: ## Lint code
20-
@echo -e "\033[32mRunning golint...\033[0m"
21-
hack/go-lint.sh $(go list -f '{{ .ImportPath }}' ./...)
22-
@echo -e "\033[32mRunning yamllint...\033[0m"
23-
hack/yaml-lint.sh
24-
@echo -e "\033[32mRunning go vet...\033[0m"
25-
hack/go-vet.sh ./...
19+
check: lint fmt vet test
2620

2721
.PHONY: build
2822
build: ## Build binary
@@ -31,7 +25,7 @@ build: ## Build binary
3125
$(DOCKER_CMD) go build -v -o bin/machine-api-operator cmd/main.go
3226

3327
.PHONY: build-e2e
34-
build-e2e: ## Build binary
28+
build-e2e: ## Build end-to-end test binary
3529
@echo -e "\033[32mBuilding e2e test binary...\033[0m"
3630
mkdir -p bin
3731
$(DOCKER_CMD) go build -v -o bin/e2e github.com/openshift/machine-api-operator/tests/e2e
@@ -52,6 +46,18 @@ push: ## Push image to docker registry
5246
docker push "$(IMAGE):$(VERSION)"
5347
docker push "$(IMAGE):$(MUTABLE_TAG)"
5448

49+
.PHONY: lint
50+
lint: ## Go lint your code
51+
hack/go-lint.sh $(go list -f '{{ .ImportPath }}' ./...)
52+
53+
.PHONY: fmt
54+
fmt: ## Go fmt your code
55+
hack/verify-gofmt.sh
56+
57+
.PHONY: vet
58+
vet: ## Apply go vet to all go files
59+
hack/go-vet.sh ./...
60+
5561
.PHONY: help
5662
help:
5763
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)