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 e49ee38
Show file tree
Hide file tree
Showing 4 changed files with 24 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
5 changes: 5 additions & 0 deletions .vale/fixtures/RedHat/Lists/testinvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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
5 changes: 5 additions & 0 deletions .vale/fixtures/RedHat/Lists/testvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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.
9 changes: 9 additions & 0 deletions .vale/styles/RedHat/Lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
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 e49ee38

Please sign in to comment.