Skip to content

Commit

Permalink
Adjust levels of Vale rules (#48850)
Browse files Browse the repository at this point in the history
Change the error levels of Vale style rules to pave the way for
requiring the Vale linter. Use the `warning` level for all rules except
for the step numbering rule. This mostly preserves the existing "check
prose style" GitHub Actions job behavior, in which Vale style rules are
optional. The one rule we require is to ensure that numbered `Step n/d`
headings follow the correct numbering scheme.
  • Loading branch information
ptgott authored Dec 2, 2024
1 parent 4b55d7b commit fff2a6f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/vale-styles/3rd-party-products/aws-vs-amazon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# /^AWS /{ print gensub(/AWS (.*)/," \"Amazon \\1\"","1") ": " $0}'
extends: substitution
message: "Incorrect AWS product name. Use %s instead of %s."
scope: raw
level: warning
ignorecase: true
swap:
Expand Down
4 changes: 2 additions & 2 deletions docs/vale-styles/examples/teleport-accounts.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extends: substitution
message: "Incorrect example of a Teleport account URL. Use %s instead of %s."
level: error
scope: raw # So we can catch instances in code fences
level: warning
scope:
- raw
ignorecase: true
swap:
- 'https://(?!status|example)\w+.teleport\.sh': 'example.teleport.sh (or status.teleport.sh for the status page)'
2 changes: 1 addition & 1 deletion docs/vale-styles/messaging/capitalization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ scope:
- list
- paragraph
message: "Capitalize the names of Teleport services and features (%s is incorrect). See the Core Concepts page (https://goteleport.com/docs/core-concepts/) for a reference."
level: error
level: warning
ignorecase: false
tokens:
# Allow for mentions of a local proxy service, but not "proxy service".
Expand Down
2 changes: 1 addition & 1 deletion docs/vale-styles/messaging/consistent-terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ scope:
- list
- paragraph
message: For consistent product messaging in the docs, use '%s' instead of '%s'.
level: error
level: warning
# Ignoring case because this rule is about word choice, rather than its
# presentation/format.
ignorecase: true
Expand Down
2 changes: 1 addition & 1 deletion docs/vale-styles/messaging/protocol-products.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends: existence
message: Avoid the impression that Teleport consists of multiple products for secure access, e.g., "Database Access" or "Server Access". Instead, talk about enrolling resources in your Teleport cluster, protecting resources with Teleport, or the ability for Teleport to proxy various protocols.
level: error
level: warning
ignorecase: false
tokens:
- 'Server Access'
Expand Down
2 changes: 1 addition & 1 deletion docs/vale-styles/structure/architecture-h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This style defines a how-to guide as any guide that includes at least one H2
# beginning "Step [0-9]".
extends: script
level: error
level: warning
message: "In a how-to guide, the first H2-level section must be called `## How it works`. Use this section to include 1-3 paragraphs that describe the high-level architecture of the setup shown in the guide, i.e., which infrastructure components are involved and how they communicate. If there is already architectural information in the guide, include it in a `## How it works` section."
scope: raw
script: |
Expand Down
2 changes: 1 addition & 1 deletion docs/vale-styles/structure/intro-paragraph.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This style enforces the presence of an introductory paragraph before the first
# H2 of a docs page.
extends: script
level: error
level: warning
message: There must be a brief intro paragraph before the first H2-level section of a docs page. Use this to describe the purpose of the guide so a reader can determine whether they should continue reading. If the guide introduces a feature, describe the purpose and benefits of the feature. If there is already an "Introduction" H2 or similar, remove the heading.
scope: raw
script: |
Expand Down

0 comments on commit fff2a6f

Please sign in to comment.