Skip to content

Commit

Permalink
feat: simplify output for easier grokking
Browse files Browse the repository at this point in the history
retain longer explanation as a comment for people searching the codebase for the error message
  • Loading branch information
bencromwell committed Nov 26, 2024
1 parent 0de794f commit d482641
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
19 changes: 11 additions & 8 deletions styles/Krystal/Gerunds.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
extends: script
message: |
For a task-based heading, start with a [bare infinitive](https://en.wikipedia.org/wiki/Infinitive#English), also known as a plain form or [base form](https://en.wikipedia.org/wiki/English_verbs#Base_form) verb.
In English, the imperative mood also uses the base form verb, so it looks the same as the bare infinitive.
Don't use gerunds (-ing words) at the beginning of headings. Instead, use a bare infinitive or a noun phrase.
Task-based headings are frequently used in quickstarts, how-to documents, and tutorials.
For a conceptual or non-task-based heading, use a [noun phrase](https://en.wikipedia.org/wiki/Noun_phrase) that doesn't start with an -ing verb.
Noun-phrase headings are frequently used in concept documentation.
# Further details:
# For a task-based heading, start with a [bare infinitive](https://en.wikipedia.org/wiki/Infinitive#English), also known as a plain form or [base form](https://en.wikipedia.org/wiki/English_verbs#Base_form) verb.
# In English, the imperative mood also uses the base form verb, so it looks the same as the bare infinitive.
#
# Task-based headings are frequently used in quickstarts, how-to documents, and tutorials.
#
# For a conceptual or non-task-based heading, use a [noun phrase](https://en.wikipedia.org/wiki/Noun_phrase) that doesn't start with an -ing verb.
#
# Noun-phrase headings are frequently used in concept documentation.
link: https://developers.google.com/style/headings#heading-and-title-text
scope: heading
script: |
Expand All @@ -18,4 +21,4 @@ script: |
for match in text.re_find(`^ *[A-Z][a-zA-Z]*ing .*$`, scope, -1) {
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
}
}
11 changes: 7 additions & 4 deletions styles/Krystal/Spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ extends: spelling
message: |
Did you really mean '%s'?
For UI elements, use [bold formatting](https://grafana.com/docs/writers-toolkit/write/style-guide/style-conventions/#bold).
The spell checker doesn't check words with bold formatting.
You may need code/bold formatting.
For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use [code formatting](https://grafana.com/docs/writers-toolkit/write/style-guide/style-conventions/#bold).
The spell checker doesn't check words with code formatting.
# Further details:
# For UI elements, use bold formatting.
#
# For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting.
#
# The spell checker doesn't check words with bold or code formatting.
level: error
dictionaries:
- en_GB
Expand Down

0 comments on commit d482641

Please sign in to comment.