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 2b30331
Show file tree
Hide file tree
Showing 4 changed files with 20 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 = suggestion
[*.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..."
11 changes: 11 additions & 0 deletions .vale/styles/RedHat/YamlEllipses.yml
Original file line number Diff line number Diff line change
@@ -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:
- '(?<!# )\.\.\.(?<!"')$'

0 comments on commit 2b30331

Please sign in to comment.