Skip to content

Commit

Permalink
Merge pull request #886 from apinnick/ocp-no-optional-in-header
Browse files Browse the repository at this point in the history
Add OpenShift "No 'Optional:' titles" rule
  • Loading branch information
apinnick authored Sep 19, 2024
2 parents 1653816 + d2f03f3 commit 800a614
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .vale/fixtures/OpenShiftAsciiDoc/NoOptionalTitles/.vale.ini
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
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

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
8 changes: 8 additions & 0 deletions .vale/styles/OpenShiftAsciiDoc/NoOptionalTitles.yml
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:'

0 comments on commit 800a614

Please sign in to comment.