Skip to content
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
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ TARGET := easyshift

CHECKMAKE := go run github.com/checkmake/checkmake/cmd/checkmake@v0.3.2
GOLANGCI_LINT := go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
ACTIONLINT := go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12


.DEFAULT_GOAL := build


.PHONY: check

check: lint build test
check: lint.light build test

.PHONY: lint.go.vet
lint.go.vet:
Expand All @@ -38,6 +39,9 @@ fix.go.fmt: # fix go formatting (if needed)
.PHONY: lint.go.light
lint.go.light: lint.go.vet lint.go.fmt




.PHONY: test
test: lint.go.light ## run unit tests
@go test -count=1 ./...
Expand All @@ -56,11 +60,25 @@ lint.go.full: lint.go.light lint.go.golangci
.PHONY: lint.make

lint.make:
@echo "linting the Makefile..."
@$(CHECKMAKE) $(MK_SOURCE)
@echo "the Makefile is OK."

.PHONY: lint.light

lint.light: lint.make lint.workflows lint.go.light


.PHONY: lint

lint: lint.make lint.go.light
lint: lint.make lint.workflows lint.go.full

.PHONY: lint.workflows

lint.workflows: ## lint the GitHub workflow files
@echo "linting GitHub workflows..."
@$(ACTIONLINT) -color
@echo "workflows are good."



Expand Down