@@ -31,36 +31,29 @@ fmt: ## Run gofmt and golangci-lint formatter.
3131 @if [ -n " $( GOLANGCI_LINT) " ]; then golangci-lint fmt; fi
3232
3333.PHONY : vet
34- vet : # # Run go vet across all modules .
34+ vet : # # Run go vet.
3535 go vet ./...
36- cd framework && go vet ./...
3736
3837.PHONY : lint
39- lint : golangci-lint # # Run golangci-lint across all modules .
38+ lint : golangci-lint # # Run golangci-lint.
4039 $(GOLANGCI_LINT ) run
41- cd framework && $(GOLANGCI_LINT ) run
4240
4341.PHONY : lint-fix
44- lint-fix : golangci-lint # # Run golangci-lint with --fix across all modules .
42+ lint-fix : golangci-lint # # Run golangci-lint with --fix.
4543 $(GOLANGCI_LINT ) run --fix
46- cd framework && $(GOLANGCI_LINT ) run --fix
4744
4845.PHONY : test
49- test : # # Run tests with race detector and coverage across all modules .
46+ test : # # Run tests with race detector and coverage.
5047 go test -race -coverprofile=$(COVERAGE_FILE ) ./...
51- cd framework && go test -race -coverprofile=$(COVERAGE_FILE ) ./...
5248
5349.PHONY : tidy
54- tidy : # # Run go mod tidy across all modules .
50+ tidy : # # Run go mod tidy.
5551 go mod tidy
56- cd framework && go mod tidy
5752
5853.PHONY : verify-tidy
59- verify-tidy : # # Verify go.mod and go.sum are tidy across all modules .
54+ verify-tidy : # # Verify go.mod and go.sum are tidy.
6055 go mod tidy
6156 @if [ -f go.sum ]; then git diff --exit-code go.mod go.sum; else git diff --exit-code go.mod; fi
62- cd framework && go mod tidy
63- @git diff --exit-code framework/go.mod framework/go.sum
6457
6558.PHONY : verify-fmt
6659verify-fmt : # # Verify code is formatted.
@@ -70,6 +63,40 @@ verify-fmt: ## Verify code is formatted.
7063verify-generate : generate # # Verify generated files are up to date.
7164 @git diff --quiet --exit-code api/ || (echo " Generated files are out of date. Run 'make generate' and commit." && git diff --stat api/ && exit 1)
7265
66+ # #@ All Modules
67+
68+ .PHONY : all-modules
69+ all-modules : all # # Run all checks across root and framework modules.
70+ $(MAKE ) -C framework all
71+
72+ .PHONY : generate-all
73+ generate-all : generate # # Regenerate DeepCopy methods across all modules.
74+ $(MAKE ) -C framework generate
75+
76+ .PHONY : test-all
77+ test-all : test # # Run tests across all modules.
78+ $(MAKE ) -C framework test
79+
80+ .PHONY : lint-all
81+ lint-all : lint # # Run golangci-lint across all modules.
82+ $(MAKE ) -C framework lint
83+
84+ .PHONY : lint-fix-all
85+ lint-fix-all : lint-fix # # Run golangci-lint with --fix across all modules.
86+ $(MAKE ) -C framework lint-fix
87+
88+ .PHONY : tidy-all
89+ tidy-all : tidy # # Run go mod tidy across all modules.
90+ $(MAKE ) -C framework tidy
91+
92+ .PHONY : verify-tidy-all
93+ verify-tidy-all : verify-tidy # # Verify go.mod/go.sum are tidy across all modules.
94+ $(MAKE ) -C framework verify-tidy
95+
96+ .PHONY : verify-generate-all
97+ verify-generate-all : verify-generate # # Verify generated files are up to date across all modules.
98+ $(MAKE ) -C framework verify-generate
99+
73100# #@ Tools
74101
75102.PHONY : golangci-lint
90117
91118.PHONY : help
92119help : # # Display this help.
93- @awk ' BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST )
120+ @awk ' BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST )
0 commit comments