-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #886 from apinnick/ocp-no-optional-in-header
Add OpenShift "No 'Optional:' titles" rule
- Loading branch information
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
; Vale configuration file to test the `NoOptionalTitles` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = error | ||
[*.adoc] | ||
OpenShiftAsciiDoc.NoOptionalTitles = YES |
9 changes: 9 additions & 0 deletions
9
.vale/fixtures/OpenShiftAsciiDoc/NoOptionalTitles/testinvalid.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//vale-fixture | ||
:_mod-docs-content-type: REFERENCE | ||
[id="optional-postinstall-configurations_{context}"] | ||
= Optional: Postinstall configurations | ||
|
||
== Optional: More postinstall configurations | ||
|
||
\\ == Optional: more options | ||
|
4 changes: 4 additions & 0 deletions
4
.vale/fixtures/OpenShiftAsciiDoc/NoOptionalTitles/testvalid.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//vale-fixture | ||
:_mod-docs-content-type: REFERENCE | ||
[id="cli-basic-commands_{context}"] | ||
= No optional CLI commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
extends: existence | ||
scope: raw | ||
level: error | ||
link: https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#assembly-file-metadata | ||
message: "Do not begin a module or assembly title with 'Optional:'." | ||
raw: | ||
- '(?<!\/\/)={1,5} Optional:' |