Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a verify rule to Makefile #122

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ code-generator:
fmt: ## Run go fmt against code.
go fmt ./...

.PHONY: fmt-verify
fmt-verify:
@out=`gofmt -w -l -d $$(find . -name '*.go')`; \
if [ -n "$$out" ]; then \
echo "$$out"; \
exit 1; \
fi

.PHONY: vet
vet: ## Run go vet against code.
go vet ./...
Expand All @@ -90,6 +98,14 @@ lint: golangci-lint ## Run golangci-lint linter
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
$(GOLANGCI_LINT) run --fix

.PHONY: ci-lint
ci-lint: golangci-lint
$(GOLANGCI_LINT) run --timeout 15m0s

.PHONY: verify
verify: vet fmt-verify ci-lint manifests generate
git --no-pager diff --exit-code config api client-go

##@ Build

.PHONY: build
Expand Down