diff --git a/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/.vale.ini b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/.vale.ini new file mode 100644 index 00000000..77b01392 --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `TrailingBackslash` rule +StylesPath = ../../../styles +MinAlertLevel = suggestion +[*.adoc] +OpenShiftAsciiDoc.TrailingBackslash = YES diff --git a/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testinvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testinvalid.adoc new file mode 100644 index 00000000..05e1e31b --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testinvalid.adoc @@ -0,0 +1,11 @@ +//vale-fixture +[source,terminal] +---- +oc get my lunch\ +---- + +//vale-fixture +[source,terminal] +---- +C:\Program Files\ +---- diff --git a/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testvalid.adoc b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testvalid.adoc new file mode 100644 index 00000000..0c456462 --- /dev/null +++ b/.vale/fixtures/OpenShiftAsciiDoc/TrailingBackslash/testvalid.adoc @@ -0,0 +1,46 @@ +[source,terminal] +---- +$ oc get my lunch +---- + +[source,terminal] +---- +# oc get my lunch +---- + +.Example +[source,terminal] +---- +$ az role assignment create --role "" \// <1> +---- + +[source,terminal] +---- +sh-4.2# chroot /host +---- + +[source,terminal] +---- +. +├── CODEOWNERS +├── README.md +└── scripts + └── validate-vale-rules.sh +---- + +[source,terminal] +---- +(undercloud)$ cd go/to/path +---- + +[source,yaml] +---- +include::yaml/boundary-clock-ptp-config.yaml[] +---- + +.Example +[source,terminal] +---- +$ az role assignment \ + create --role "" +---- diff --git a/.vale/styles/OpenShiftAsciiDoc/TrailingBackslash.yml b/.vale/styles/OpenShiftAsciiDoc/TrailingBackslash.yml new file mode 100644 index 00000000..893ba6c0 --- /dev/null +++ b/.vale/styles/OpenShiftAsciiDoc/TrailingBackslash.yml @@ -0,0 +1,9 @@ +--- +extends: existence +scope: raw +level: error +message: "Codeblock contains unescaped trailing backslash." +action: + name: remove +raw: + - '(?