Files
Никита Шубин 77ed9fcf85 [hw-4] add postgres db
2025-06-26 12:08:46 +00:00

31 lines
560 B
Makefile

GOVER=$(shell go version | perl -nle '/(go\d\S+)/; print $$1;')
LINTBIN=bin/golangci-lint
define lint
@if [ -f "$(1)/go.mod" ]; then \
output=$$(${LINTBIN} --config=.golangci.yaml run $(1)/... 2>&1); \
exit_code=$$?; \
echo "$$output"; \
if [ $$exit_code -ne 0 ]; then \
if echo "$$output" | grep -q "no go files to analyze"; then \
exit 0; \
else \
exit $$exit_code; \
fi \
fi \
fi
endef
cart-lint:
$(call lint,cart)
loms-lint:
$(call lint,loms)
notifier-lint:
$(call lint,notifier)
comments-lint:
$(call lint,comments)