Skip to content

Commit

Permalink
ci: add format check (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
avtakkar authored May 21, 2024
1 parent 8cc76dd commit 145f21b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ include $(ROOT_DIR)/tests/Makefile
.DEFAULT_GOAL := all

.PHONY: all
all: lint test build ## Runs the peerd build targets in the correct order.
all: check test build ## Runs the peerd build targets in the correct order.

.PHONY: check
check: check-format lint vet ## Check the source code.

.PHONY: build
build: ## Build the peerd packages
build: ## Build the peerd packages.
@echo "+ $@"
@( $(GOBUILD) -o $(BIN_DIR)/peerd ./cmd/proxy )

Expand Down Expand Up @@ -70,6 +73,16 @@ endif

info: header

.PHONY: check-format
check-format: ## Format the Go code.
@echo "+ $@"
@( test -z $(gofmt -l .) )

.PHONY: vet
vet: ## Run go vet.
@echo "+ $@"
@( go vet ./... )

.PHONY: lint
lint: ## Run linter.
@echo "+ $@"
Expand Down

0 comments on commit 145f21b

Please sign in to comment.