Skip to content

Commit

Permalink
new ProductCentricWriting rule
Browse files Browse the repository at this point in the history
  • Loading branch information
aireilly committed Aug 28, 2023
1 parent c06511b commit 4943fe2
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .vale/fixtures/RedHat/ProductCentricWriting/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Vale configuration file to test the `ProductCentricWriting` rule
StylesPath = ../../../styles
MinAlertLevel = suggestion
[*.adoc]
RedHat.ProductCentricWriting = YES
4 changes: 4 additions & 0 deletions .vale/fixtures/RedHat/ProductCentricWriting/testinvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
OpenShift allows customers to use a Kubernetes Network Policy to create microsegmentation between deployed application services on the cluster.
The `monitoring-rules-edit` rule permits you to create and silence alerts in the *Developer* perspective in the web console.
The `must-gather` tool enables the user to collect diagnostic information about your cluster.
LoadBalancer lets users assign an external load balancer to an associated service API object in your {product-title} cluster.
Empty file.
13 changes: 13 additions & 0 deletions .vale/styles/RedHat/ProductCentricWriting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
extends: substitution
ignorecase: true
level: suggestion
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/productcentricwriting/
message: "%s"
swap:
# Start each error message with "Do not use ..."
# Error messages must be single quoted.
'allows(?: you| customers| the customer| the user| users)': 'Do not use "allows" to grant abilities to inanimate objects, as in "the product allows you to…". Whenever possible, use a direct, user-focused alternative.'
'enables(?: you| customers| the customer| the user| users)': 'Do not use "enables" to grant abilities to inanimate objects, as in "the product enables you to…". Whenever possible, use a direct, user-focused alternative.'
'lets(?: you| customers| the customer| the user| users)': 'Do not use "lets" to grant abilities to inanimate objects, as in "the product lets you…". Whenever possible, use a direct, user-focused alternative.'
'permits(?: you| customers| the customer| the user| users)': 'Do not use "permits" to grant abilities to inanimate objects, unless the object is a type of authorization that does grant abilities.'
7 changes: 4 additions & 3 deletions modules/reference-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
* xref:ellipses.adoc[]
* xref:headingpunctuation.adoc[]
* xref:headings.adoc[]
//* xref:images.adoc[]
//* xref:links.adoc[]
* xref:oxfordcomma.adoc[]
* xref:pascalcamelcase.adoc[]
* xref:passivevoice.adoc[]
* xref:productcentricwriting.adoc[]
* xref:readabilitygrade.adoc[]
* xref:releasenotes.adoc[]
* xref:repeatedwords.adoc[]
Expand All @@ -28,4 +27,6 @@
* xref:termssuggestions.adoc[]
* xref:termswarnings.adoc[]
* xref:usage.adoc[]
* xref:userreplacedvalues.adoc[]
* xref:userreplacedvalues.adoc[]
//* xref:images.adoc[]
//* xref:links.adoc[]
2 changes: 1 addition & 1 deletion modules/reference-guide/pages/pascalcamelcase.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:navtitle: PascalCamelCase
:navtitle: Pascal and camel case
:keywords: reference, rule, PascalCamelCase

= Pascal case and Camel case
Expand Down
2 changes: 1 addition & 1 deletion modules/reference-guide/pages/passivevoice.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:navtitle: PassiveVoice
:navtitle: Passive voice
:keywords: reference, rule, PassiveVoice

= Passive Voice
Expand Down
11 changes: 11 additions & 0 deletions modules/reference-guide/pages/productcentricwriting.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:navtitle: Product-centric writing
:keywords: product-centric, writing

= Product-centric writing

Do not use product-centric writing to grant abilities to inanimate objects. Where possible, make the user the subject of the sentence.

.Additional resources

* link:{ibmsg-url-print}[{ibmsg-print} - Conversational style, p. 19]
* link:{ibmsg-url}?topic=medium-conversational-style[{ibmsg} - Conversational style]

0 comments on commit 4943fe2

Please sign in to comment.