chore: полировка репозитория
- .gitattributes (LF-нормализация) - CI/Makefile: проверка go mod tidy (-diff) - template/README: заметка про удаление replace при копировании
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
GO ?= go
|
||||
GOLANGCI_LINT ?= golangci-lint
|
||||
|
||||
.PHONY: test test-fast lint fmt tidy toolkit-deps ci
|
||||
.PHONY: test test-fast lint fmt tidy tidy-check toolkit-deps ci
|
||||
|
||||
# Тесты с race-детектором (основной гейт).
|
||||
test:
|
||||
@@ -27,6 +27,11 @@ fmt:
|
||||
tidy:
|
||||
$(GO) mod tidy
|
||||
|
||||
# Проверка, что go.mod/go.sum в tidy-состоянии (дрейф ловим в CI).
|
||||
tidy-check:
|
||||
@$(GO) mod tidy -diff >/dev/null 2>&1 || { echo "go.mod не tidy — запусти make tidy"; $(GO) mod tidy -diff; exit 1; }
|
||||
@echo "tidy: ok"
|
||||
|
||||
# Карантин зависимостей: тулкит обязан оставаться stdlib + go-sdk
|
||||
# (+ yaml/toml в validate). Любая другая ПРЯМАЯ зависимость — ошибка.
|
||||
toolkit-deps:
|
||||
@@ -39,4 +44,4 @@ toolkit-deps:
|
||||
fi; \
|
||||
echo "toolkit-deps: ok"
|
||||
|
||||
ci: test lint toolkit-deps
|
||||
ci: test lint tidy-check toolkit-deps
|
||||
|
||||
Reference in New Issue
Block a user