Skip to content

Commit

Permalink
YAML ellipses rule
Browse files Browse the repository at this point in the history
  • Loading branch information
apinnick committed Sep 22, 2024
1 parent 1653816 commit 8391f59
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .vale/fixtures/RedHat/YamlEllipses/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Vale configuration file to test the `YamlEllipses` rule
StylesPath = ../../../styles
MinAlertLevel = error
[*.adoc]
RedHat.YamlEllipses = YES
2 changes: 2 additions & 0 deletions .vale/fixtures/RedHat/YamlEllipses/testinvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
...
...
2 changes: 2 additions & 0 deletions .vale/fixtures/RedHat/YamlEllipses/testvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ...
echo -n "Creating NAT Gateway..."
10 changes: 10 additions & 0 deletions .vale/styles/RedHat/YamlEllipses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: existence
scope: code
level: suggestion
link: https://yaml.org/spec/1.2.2/#22-structures
message: "Use '%s' rather than '%s' as ellipsis in YAML code blocks."
action:
name: replace
swap:
"(?<!# )...": # ...

0 comments on commit 8391f59

Please sign in to comment.