test: add docslinks linter (#5601)

this checks links in the documentation.
This commit is contained in:
Alessandro Ros
2026-03-21 13:04:14 +01:00
committed by GitHub
parent a82e0c7a9d
commit 0f42f087ab
5 changed files with 308 additions and 7 deletions
+6 -5
View File
@@ -16,8 +16,7 @@ lint-go:
golangci-lint run -v
lint-go-mod:
go mod tidy
git diff --exit-code
go mod tidy -diff
lint-conf:
go test -v -tags enable_linters ./internal/linters/conf
@@ -25,15 +24,17 @@ lint-conf:
lint-go2api:
go test -v -tags enable_linters ./internal/linters/go2api
lint-docslinks:
go test -v -tags enable_linters ./internal/linters/docslinks
lint-docs:
echo "$$DOCKERFILE_DOCS_LINT" | docker build . -f - -t temp
docker run --rm -v "$(shell pwd)/docs:/s" -w /s temp \
sh -c "prettier --write ."
git diff --exit-code
sh -c "prettier --check ."
lint-api-docs:
echo "$$DOCKERFILE_API_DOCS_LINT" | docker build . -f - -t temp
docker run --rm -v "$(shell pwd)/api:/s" -w /s temp \
sh -c "openapi lint openapi.yaml"
lint: lint-go lint-go-mod lint-conf lint-go2api lint-docs lint-api-docs
lint: lint-go lint-go-mod lint-conf lint-go2api lint-docslinks lint-docs lint-api-docs