From 364ddc6125900095979bb43a40ed7e0b21dc7184 Mon Sep 17 00:00:00 2001 From: Aidan Reilly <74046732+aireilly@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:51:13 +0100 Subject: [PATCH] Don't lint commented lines --- .github/workflows/vale-on-pull.yml | 4 +++- .../OpenShiftAsciiDoc/NoXrefInModules/testvalid.adoc | 2 ++ .../OpenShiftAsciiDoc/XrefContainsAnchorID/testvalid.adoc | 2 ++ .../OpenShiftAsciiDoc/XrefContainsHTML/testvalid.adoc | 4 ++-- .vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml | 2 +- .vale/styles/OpenShiftAsciiDoc/XrefContainsAnchorID.yml | 2 +- .vale/styles/OpenShiftAsciiDoc/XrefContainsHTML.yml | 2 +- antora-playbook.yml | 1 - modules/contributor-guide/nav.adoc | 3 +-- modules/contributor-guide/pages/.placeholder | 0 modules/contributor-guide/pages/contributor-guide.adoc | 6 ------ modules/contributor-guide/partials/nav.adoc | 1 - modules/reference-guide/nav.adoc | 3 +-- modules/reference-guide/pages/reference-guide.adoc | 6 ------ modules/reference-guide/partials/nav.adoc | 1 - modules/user-guide/nav.adoc | 3 +-- modules/user-guide/pages/.placeholder | 0 modules/user-guide/pages/user-guide.adoc | 6 ------ modules/user-guide/pages/using-vale-in-the-ide.adoc | 2 +- modules/user-guide/partials/nav.adoc | 1 - 20 files changed, 16 insertions(+), 35 deletions(-) delete mode 100644 modules/contributor-guide/pages/.placeholder delete mode 100644 modules/contributor-guide/pages/contributor-guide.adoc delete mode 120000 modules/contributor-guide/partials/nav.adoc delete mode 100644 modules/reference-guide/pages/reference-guide.adoc delete mode 120000 modules/reference-guide/partials/nav.adoc delete mode 100644 modules/user-guide/pages/.placeholder delete mode 100644 modules/user-guide/pages/user-guide.adoc delete mode 120000 modules/user-guide/partials/nav.adoc diff --git a/.github/workflows/vale-on-pull.yml b/.github/workflows/vale-on-pull.yml index ab3d763b1..f17b38a71 100644 --- a/.github/workflows/vale-on-pull.yml +++ b/.github/workflows/vale-on-pull.yml @@ -13,9 +13,11 @@ on: [pull_request] jobs: vale: name: Linting with Vale - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor - uses: errata-ai/vale-action@reviewdog with: filter_mode: diff_context diff --git a/.vale/fixtures/OpenShiftAsciiDoc/NoXrefInModules/testvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/NoXrefInModules/testvalid.adoc index 2a4fb8c21..6d5015657 100644 --- a/.vale/fixtures/OpenShiftAsciiDoc/NoXrefInModules/testvalid.adoc +++ b/.vale/fixtures/OpenShiftAsciiDoc/NoXrefInModules/testvalid.adoc @@ -1 +1,3 @@ No xrefs here! + +//xref:../rosa_getting_started/rosa-getting-started.adoc#rosa-getting-started[Getting started with {product-title}] diff --git a/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsAnchorID/testvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsAnchorID/testvalid.adoc index b128ebbb8..8482919bd 100644 --- a/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsAnchorID/testvalid.adoc +++ b/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsAnchorID/testvalid.adoc @@ -1,3 +1,5 @@ xref:../rosa_getting_started/rosa-getting-started.adoc#getting-started[Getting started with {product-title}] xref:../rosa_getting_started/rosa-getting-started.adoc#getting-started + +// stuff xref:../rosa/rosa-getting-started.adoc[Getting started with {product-title}] diff --git a/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsHTML/testvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsHTML/testvalid.adoc index 3453e7677..ec01802bf 100644 --- a/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsHTML/testvalid.adoc +++ b/.vale/fixtures/OpenShiftAsciiDoc/XrefContainsHTML/testvalid.adoc @@ -1,6 +1,6 @@ +//vale-fixture xref:../rosa_getting_started/rosa-getting-started.adoc#getting-started[Getting started with {product-title}] -xref:../rosa_getting_started/rosa-getting-started.adoc#getting-started - +//xref:../rosa_getting_started/rosa-getting-started.html#getting-started[Getting started with {product-title}] diff --git a/.vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml b/.vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml index 9de1831cf..5822240df 100644 --- a/.vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml +++ b/.vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml @@ -5,4 +5,4 @@ level: error link: https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#links-hyperlinks-and-cross-references message: "Do not include xrefs in modules, only assemblies." tokens: - - 'xref:(.*)(\.adoc)#(.*)' + - '(?