diff --git a/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/.vale.ini b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/.vale.ini new file mode 100644 index 000000000..ace796a0d --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `NoLineRanges` rule +StylesPath = ../../../styles +MinAlertLevel = error +[*.adoc] +OpenShiftAsciiDoc.NoLineRanges = YES diff --git a/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testinvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testinvalid.adoc new file mode 100644 index 000000000..0167e8cd2 --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testinvalid.adoc @@ -0,0 +1,11 @@ +//vale-fixture +include::filename.txt[lines=5..10] + +//vale-fixture +include::filename.txt[lines="1..10,15..20"] + +//vale-fixture +include::filename.txt[lines=7;14..25;28..43] + +//vale-fixture +include::filename.txt[lines=12..-1] diff --git a/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testvalid.adoc new file mode 100644 index 000000000..78d2f5d12 --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/NoLineRanges/testvalid.adoc @@ -0,0 +1,15 @@ +include::snippets/technology-preview.adoc[leveloffset=+0] + +include::https://raw.githubusercontent.com/openshift/managed-cluster-validating-webhooks/master/docs/webhooks.json[] + +include::yaml/ordinary-clock.yaml[leveloffset=+0] + +include::yaml/ordinary-clock.yml[leveloffset=+0] + +include::ordinary-clock.json[leveloffset=+0] + +include::ordinary-clock.txt[leveloffset=+0] + +include::ordinary-clock.md[leveloffset=+0] + +include::xml/path/ordinary-clock.xml[] diff --git a/.vale/styles/OpenShiftAsciiDoc/NoLineRanges.yml b/.vale/styles/OpenShiftAsciiDoc/NoLineRanges.yml new file mode 100644 index 000000000..d26c8c4bd --- /dev/null +++ b/.vale/styles/OpenShiftAsciiDoc/NoLineRanges.yml @@ -0,0 +1,8 @@ +--- +extends: existence +scope: raw +level: error +link: https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#assembly-file-metadata +message: "Do not use line ranges for included files." +raw: + - '(?