diff --git a/docs/docs.mk b/docs/docs.mk index 09308dc8..de9c4144 100644 --- a/docs/docs.mk +++ b/docs/docs.mk @@ -31,9 +31,6 @@ ifeq ($(PROJECTS),) $(error "PROJECTS variable must be defined in variables.mk") endif -# First project is considered the primary one used for doc-validator. -PRIMARY_PROJECT := $(subst /,-,$(firstword $(subst :, ,$(firstword $(PROJECTS))))) - # Host port to publish container port to. ifeq ($(origin DOCS_HOST_PORT), undefined) export DOCS_HOST_PORT := 3002 @@ -44,12 +41,7 @@ ifeq ($(origin DOCS_IMAGE), undefined) export DOCS_IMAGE := grafana/docs-base:latest endif -# Container image used for doc-validator linting. -ifeq ($(origin DOC_VALIDATOR_IMAGE), undefined) -export DOC_VALIDATOR_IMAGE := grafana/doc-validator:latest -endif - -# Container image used for vale linting. +# Container image used for Vale linting. ifeq ($(origin VALE_IMAGE), undefined) export VALE_IMAGE := grafana/vale:latest endif @@ -99,14 +91,6 @@ docs-debug: ## Run Hugo web server with debugging enabled. TODO: support all SER docs-debug: make-docs WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug' $(CURDIR)/make-docs $(PROJECTS) -.PHONY: doc-validator -doc-validator: ## Run doc-validator on the entire docs folder which includes pulling the latest `DOC_VALIDATOR_IMAGE` (default: `grafana/doc-validator:latest`) container image. To not pull the image, set `PULL=false`. -doc-validator: make-docs -ifeq ($(PULL), true) - $(PODMAN) pull -q $(DOC_VALIDATOR_IMAGE) -endif - DOCS_IMAGE=$(DOC_VALIDATOR_IMAGE) $(CURDIR)/make-docs $(PROJECTS) - .PHONY: vale vale: ## Run vale on the entire docs folder which includes pulling the latest `VALE_IMAGE` (default: `grafana/vale:latest`) container image. To not pull the image, set `PULL=false`. vale: make-docs diff --git a/docs/make-docs b/docs/make-docs index f6d72f90..d2778ecc 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -8,6 +8,14 @@ # [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes. # Changes are relevant to this script and the support docs.mk GNU Make interface. # +# ## 9.0.0 (2025-04-05) +# +# ### Removed +# +# - doc-validator target and associated scripts. +# +# Most useful rules have been migrated to Vale and the others are often false positives. +# # ## 8.5.2 (2025-02-28) # # ### Fixed @@ -831,51 +839,6 @@ ${DOCS_IMAGE} POSIX_HERESTRING case "${image}" in - 'grafana/doc-validator') - proj="$(new_proj "$1")" - printf '\r\n' - - IFS='' read -r cmd </dev/null 2>&1; then - # shellcheck disable=SC2016 - errr '`jq` must be installed for the `doc-validator` target to work.' - # shellcheck disable=SC2016 - note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,' - - exit 1 - fi - - ${cmd} \ - | jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end' - ;; - json) - ${cmd} - ;; - *) # default - errr "Invalid output format '${OUTPUT_FORMAT}'" - esac - ;; 'grafana/vale') proj="$(new_proj "$1")" printf '\r\n'