Skip to content

Commit 51f0e98

Browse files
authored
Add spell checker section to contributing guide (#198)
1 parent 89842ac commit 51f0e98

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/contributing/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,37 @@ You can get some hints of whom to contact by looking at [CODEOWNERS](https://git
6363
To minimise the overhead of the contributing to the documentation and speed up "time-to-published-docs" we do not have a formal review process.
6464
We will start simple, and add more formality as needed.
6565

66+
### Spell checker
67+
68+
A spell checker workflow runs on all PRs to help catch simple typos.
69+
If the spell checker finds words that it considers misspelled, it will add a comment like [this](https://github.com/eth-cscs/cscs-docs/pull/193#issuecomment-3056795496) to the PR, listing the words that it finds misspelled.
70+
71+
The spell checker isn't always right and can be configured to ignore words.
72+
Most frequently technical terms, project names, etc. will not be in the dictionaries.
73+
There are three files used to configure words that get ignored:
74+
75+
- `.github/actions/spelling/allow.txt`:
76+
This is the main file for whitelisting words.
77+
Each line of the file contains a word that is ignored by the spell checker.
78+
All lowercase words are matched with any capitalization, while words containing at least one uppercase letter are matched with the given capitalization.
79+
Using the capitalized word is useful if you always want to ensure the same spelling, e.g. for names.
80+
<!--begin no spell check-->
81+
- `.github/actions/spelling/patterns.txt`:
82+
This file is used to ignore words that match a given regular expression.
83+
This file is useful to ignore e.g. URLs or markdown references.
84+
Words that have unusual capitalization may also need to be added to this file to make sure they are ignored.
85+
For example, "FirecREST" is normally recognized as two words: "Firec" and "REST", and adding "FirecREST" to `allow.txt` will not ignore the word.
86+
In this case it can be ignored by adding it to `patterns.txt`
87+
<!--end no spell check-->
88+
- `.github/actions/spelling/block-delimiters.txt`:
89+
This file can be used to ignore words between begin- and end markers.
90+
For example, code blocks starting and ending with `` ``` `` are ignored from spell checking as they often contain unusual words not in dictionaries.
91+
If adding words to `allow.txt` or `patterns.txt`, or ignoring blocks with `block-delimiters.list`, is not sufficient, you can as a last resort use the HTML comments `<!--begin no spell check-->` and `<!--end no spell check-->` to ignore spell checking for a larger block of text.
92+
The comments will not be rendered in the final documentation.
93+
94+
Additionally, the file `.github/actions/spelling/only.txt` contains a list of regular expressions used to match which files to check.
95+
Only markdown files under the `docs` directory are checked.
96+
6697
[](){#ref-contributing-guidelines}
6798
## Guidelines
6899

0 commit comments

Comments
 (0)