File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ post-deploy-test: ## Run post deployment tests
89
89
@echo " Post-deployment tests passed."
90
90
91
91
.PHONY : lint
92
- lint : check-golangci-lint # # Run lint
92
+ lint : check-golangci-lint check-golangci-lint-version # # Run lint
93
93
@printf " \033[33;1m==== Running linting ====\033[0m\n"
94
94
golangci-lint run
95
95
@@ -189,6 +189,14 @@ check-golangci-lint:
189
189
@command -v golangci-lint > /dev/null 2>&1 || { \
190
190
echo " ❌ golangci-lint is not installed. Install from https://golangci-lint.run/docs/welcome/install/" ; exit 1; }
191
191
192
+ .PHONY : check-golangci-lint-version
193
+ check-golangci-lint-version :
194
+ @version=$$(golangci-lint --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n 1 ) ; \
195
+ if [[ $$ version != 2.* ]]; then \
196
+ echo " ❌ golangci-lint version 2.x is required. Current version: $$ version" ; \
197
+ exit 1; \
198
+ fi
199
+
192
200
.PHONY : check-container-tool
193
201
check-container-tool :
194
202
@command -v $(CONTAINER_TOOL ) > /dev/null 2>&1 || { \
You can’t perform that action at this time.
0 commit comments