From 2b30331ebfe738285d0a1915685687c9fdf225c8 Mon Sep 17 00:00:00 2001 From: Avital Pinnick Date: Sun, 22 Sep 2024 16:26:37 +0300 Subject: [PATCH] YAML ellipses rule --- .vale/fixtures/RedHat/YamlEllipses/.vale.ini | 5 +++++ .vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc | 2 ++ .vale/fixtures/RedHat/YamlEllipses/testvalid.adoc | 2 ++ .vale/styles/RedHat/YamlEllipses.yml | 11 +++++++++++ 4 files changed, 20 insertions(+) create mode 100644 .vale/fixtures/RedHat/YamlEllipses/.vale.ini create mode 100644 .vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc create mode 100644 .vale/fixtures/RedHat/YamlEllipses/testvalid.adoc create mode 100644 .vale/styles/RedHat/YamlEllipses.yml diff --git a/.vale/fixtures/RedHat/YamlEllipses/.vale.ini b/.vale/fixtures/RedHat/YamlEllipses/.vale.ini new file mode 100644 index 00000000..d8d86796 --- /dev/null +++ b/.vale/fixtures/RedHat/YamlEllipses/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `YamlEllipses` rule +StylesPath = ../../../styles +MinAlertLevel = suggestion +[*.adoc] +RedHat.YamlEllipses = YES diff --git a/.vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc b/.vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc new file mode 100644 index 00000000..aa2ae472 --- /dev/null +++ b/.vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc @@ -0,0 +1,2 @@ +... + ... diff --git a/.vale/fixtures/RedHat/YamlEllipses/testvalid.adoc b/.vale/fixtures/RedHat/YamlEllipses/testvalid.adoc new file mode 100644 index 00000000..d06489a3 --- /dev/null +++ b/.vale/fixtures/RedHat/YamlEllipses/testvalid.adoc @@ -0,0 +1,2 @@ +# ... +echo -n "Creating NAT Gateway..." \ No newline at end of file diff --git a/.vale/styles/RedHat/YamlEllipses.yml b/.vale/styles/RedHat/YamlEllipses.yml new file mode 100644 index 00000000..f48207ec --- /dev/null +++ b/.vale/styles/RedHat/YamlEllipses.yml @@ -0,0 +1,11 @@ +--- +extends: existence +level: suggestion +message: "Use '# ...' rather than '...' as ellipsis in YAML code blocks." +link: https://yaml.org/spec/1.2.2/#22-structures +scope: raw +nonword: true +action: + name: edit +tokens: + - '(?