From 724c30d0066be00cfd87b45414c77be8a407b330 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 9 Oct 2024 16:44:05 -0700 Subject: [PATCH 1/2] Upgrade Vale to v3 Closes #854 --- .vale.ini | 2 ++ Makefile | 5 +++-- requirements.txt | 2 +- styles/{Vocab => config/vocabularies}/Base/accept.txt | 0 styles/{Vocab => config/vocabularies}/Base/reject.txt | 0 styles/{Vocab => config/vocabularies}/Plone/accept.txt | 0 styles/{Vocab => config/vocabularies}/Plone/reject.txt | 0 7 files changed, 6 insertions(+), 3 deletions(-) rename styles/{Vocab => config/vocabularies}/Base/accept.txt (100%) rename styles/{Vocab => config/vocabularies}/Base/reject.txt (100%) rename styles/{Vocab => config/vocabularies}/Plone/accept.txt (100%) rename styles/{Vocab => config/vocabularies}/Plone/reject.txt (100%) diff --git a/.vale.ini b/.vale.ini index 5001cf101..f89759a51 100644 --- a/.vale.ini +++ b/.vale.ini @@ -8,3 +8,5 @@ Packages = Microsoft [*] BasedOnStyles = Vale, Microsoft +Microsoft.Contractions = suggestion +Microsoft.Units = suggestion diff --git a/Makefile b/Makefile index 1a1724f23..7df3f8687 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . VALEFILES := $(shell find $(DOCS_DIR) -type f -name "*.md" -print) +VALEOPTS ?= # Add the following 'help' target to your Makefile # And add help text after each target name starting with '\#\#' @@ -186,8 +187,8 @@ linkcheckbroken: bin/python ## Run linkcheck and show only broken links .PHONY: vale vale: bin/python ## Run Vale style, grammar, and spell checks - vale sync - vale --no-wrap $(VALEFILES) + bin/vale sync + bin/vale --no-wrap $(VALEOPTS) $(VALEFILES) @echo @echo "Vale is finished; look for any errors in the above output." diff --git a/requirements.txt b/requirements.txt index 0430482f4..2af322d06 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ sphinx-sitemap sphinx-togglebutton sphinxcontrib-spelling sphinxext-opengraph -vale==2.30.0 +vale==3.7.1.0 diff --git a/styles/Vocab/Base/accept.txt b/styles/config/vocabularies/Base/accept.txt similarity index 100% rename from styles/Vocab/Base/accept.txt rename to styles/config/vocabularies/Base/accept.txt diff --git a/styles/Vocab/Base/reject.txt b/styles/config/vocabularies/Base/reject.txt similarity index 100% rename from styles/Vocab/Base/reject.txt rename to styles/config/vocabularies/Base/reject.txt diff --git a/styles/Vocab/Plone/accept.txt b/styles/config/vocabularies/Plone/accept.txt similarity index 100% rename from styles/Vocab/Plone/accept.txt rename to styles/config/vocabularies/Plone/accept.txt diff --git a/styles/Vocab/Plone/reject.txt b/styles/config/vocabularies/Plone/reject.txt similarity index 100% rename from styles/Vocab/Plone/reject.txt rename to styles/config/vocabularies/Plone/reject.txt From 2fa83237704e440e027d8adadd13eeae9a3be21f Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 9 Oct 2024 17:01:36 -0700 Subject: [PATCH 2/2] =?UTF-8?q?Use=20latest=20VALEOPTS=20in=20test=20outpu?= =?UTF-8?q?t.=20Some=20day=20we=20might=20bring=20it=20down=20to=200=20err?= =?UTF-8?q?ors=20and=20=F0=9F=A5=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f0f98f25..8248c7745 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,4 @@ jobs: run: make test - name: Run Vale - run: | - git clone https://github.com/errata-ai/Microsoft.git - cp -r ./Microsoft/Microsoft ./styles - VALEFILES=$(find ./docs/ -type f -name "*.md" -print) - vale --no-exit $VALEFILES + run: make vale VALEOPTS="--no-exit --minAlertLevel='warning'"