Skip to content

Commit

Permalink
Don't lint commented lines
Browse files Browse the repository at this point in the history
  • Loading branch information
aireilly committed Oct 17, 2024
1 parent 9da4b3b commit 17d9a1f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/vale-on-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
No xrefs here!

//xref:../rosa_getting_started/rosa-getting-started.adoc#rosa-getting-started[Getting started with {product-title}]
Original file line number Diff line number Diff line change
@@ -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}]
Original file line number Diff line number Diff line change
@@ -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}]


2 changes: 1 addition & 1 deletion .vale/styles/OpenShiftAsciiDoc/NoXrefInModules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)#(.*)'
- '(?<!\/\/.*)xref:(.*)(\.adoc)#(.*)'
2 changes: 1 addition & 1 deletion .vale/styles/OpenShiftAsciiDoc/XrefContainsAnchorID.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "The xref is missing an anchor ID."
raw:
- 'xref(.*)(\.adoc)(?!\#)'
- '(?<!\/\/.*)xref(.*)(\.adoc)(?!\#)'
2 changes: 1 addition & 1 deletion .vale/styles/OpenShiftAsciiDoc/XrefContainsHTML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "Use .adoc instead of .html in xrefs"
tokens:
- 'xref(.*)(\.html)#(.*)'
- '(?<!\/\/.*)xref(.*)(\.html)#(.*)'

0 comments on commit 17d9a1f

Please sign in to comment.