File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ image-push:
102
102
$(CONTAINER_CMD ) push $(IMG )
103
103
104
104
# Check the code
105
- .PHONY : check check-golangci-lint check-format check-yaml
105
+ .PHONY : check check-golangci-lint check-format check-yaml check-gitlint
106
106
107
107
check : check-golangci-lint vet check-yaml
108
108
@@ -112,6 +112,9 @@ check-golangci-lint: golangci-lint
112
112
check-yaml :
113
113
$(YAMLLINT_CMD ) -c ./.yamllint.yaml ./
114
114
115
+ check-gitlint : gitlint
116
+ $(GITLINT ) -C .gitlint --commits origin/main.. lint
117
+
115
118
# Find or download auxiliary build tools
116
119
.PHONY : build-tools golangci-lint yq
117
120
build-tools : golangci-lint yq
@@ -135,4 +138,14 @@ ifeq (, $(shell command -v $(YQ) ;))
135
138
@echo "yq installed in $(YQ)"
136
139
endif
137
140
138
-
141
+ gitlint :
142
+ ifeq (, $(shell command -v gitlint ;) )
143
+ @echo "gitlint not found in PATH, checking $(GOBIN_ALT)"
144
+ ifeq (, $(shell command -v $(GOBIN_ALT ) /gitlint ;) )
145
+ @$(call installtool, --gitlint)
146
+ @echo "gitlint installed in $(GOBIN_ALT)"
147
+ endif
148
+ GITLINT =$(GOBIN_ALT ) /gitlint
149
+ else
150
+ GITLINT =$(shell command -v gitlint ;)
151
+ endif
You can’t perform that action at this time.
0 commit comments