Skip to content

Commit 23d2bf7

Browse files
Add makefile target and start to check api diff linter in the ci
1 parent 578dc33 commit 23d2bf7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ help-extended: #HELP Display extended help.
118118
#SECTION Development
119119

120120
.PHONY: lint
121-
lint: lint-custom $(GOLANGCI_LINT) #HELP Run golangci linter.
121+
lint: lint-custom api-lint-diff $(GOLANGCI_LINT) #HELP Run golangci linter.
122122
$(GOLANGCI_LINT) run --build-tags $(GO_BUILD_TAGS) $(GOLANGCI_LINT_ARGS)
123123

124124
.PHONY: lint-helm
@@ -149,6 +149,10 @@ custom-linter-build: #EXHELP Build custom linter
149149
lint-custom: custom-linter-build #EXHELP Call custom linter for the project
150150
go vet -tags=$(GO_BUILD_TAGS) -vettool=./bin/custom-linter ./...
151151

152+
.PHONY: api-lint-diff
153+
api-lint-diff: #HELP Validate API changes using kube-api-linter with diff-aware analysis
154+
bash hack/api-lint-diff/run.sh
155+
152156
.PHONY: k8s-pin
153157
k8s-pin: #EXHELP Pin k8s staging modules based on k8s.io/kubernetes version (in go.mod or from K8S_IO_K8S_VERSION env var) and run go mod tidy.
154158
K8S_IO_K8S_VERSION='$(K8S_IO_K8S_VERSION)' go run hack/tools/k8smaintainer/main.go

0 commit comments

Comments
 (0)