Skip to content

Commit

Permalink
Added rule for Lists
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Nov 9, 2023
1 parent 934b05e commit e52f1cf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .vale/fixtures/RedHat/Lists/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Vale configuration file to test the `Lists` rule
StylesPath = ../../../styles
MinAlertLevel = suggestion
[*.adoc]
RedHat.Lists = YES
4 changes: 4 additions & 0 deletions .vale/fixtures/RedHat/Lists/testinvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove the cover:
- Loosen the captive screws on the side of the cover.
- Slide the cover toward the back of the computer until the cover clicks
- Lift the cover straight up
4 changes: 4 additions & 0 deletions .vale/fixtures/RedHat/Lists/testvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove the cover:
- Loosen the captive screws on the side of the cover.
- Slide the cover toward the back of the computer until the cover clicks.
- Lift the cover straight up.
8 changes: 8 additions & 0 deletions .vale/styles/RedHat/Lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
extends: conditional
message: "Write lists so that all or none of the items start with complete sentences. If list items comprise only complete sentences, include a period after each sentence. Except in definition lists, do not include any end punctuation if list items comprise only sentence fragments."
level: error
scope: list
ignorecase: true
first: '\w+[^.!?]*[.!?]'
second: '\w+[^.!?]*[.!?]'

0 comments on commit e52f1cf

Please sign in to comment.