From 17d9a1fbbde75aa1125e5eec33e086d588bc368c 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 +++- .../fixtures/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 +- 7 files changed, 12 insertions(+), 6 deletions(-) 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)#(.*)' + - '(?