Skip to content

Commit 5d72271

Browse files
SuperGops7SuperGops7
andauthored
Update documentation for automatic spellcheck (#5105)
* docs: initial update * docs: update-environment-hooks * chore: lint fixes * chore: update doc as per PR comments * chore: update PR review comments * chore: update gitignore * docs: update docs for automatic spellcheck * chore: update as per PR comments * chore: update as per PR comments --------- Co-authored-by: SuperGops7 <[email protected]>
1 parent 206d16d commit 5d72271

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ _build/
33
.idea/
44
.vscode/
55
__pycache__
6+
ros2doc/

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ To check the spelling, use:
5858
`make spellcheck`
5959

6060
> [!NOTE]
61-
> If that detects specific words that need to be ignored, add it to [codespell_whitelist](./codespell_whitelist.txt).
61+
> If that detects specific words that need to be ignored, add it to [codespell_whitelist](./codespell_whitelist.txt). \
62+
> To include any custom corrections that are to be applied, add it to [codespell_dictionary](./codespell_dictionary.txt).
6263
6364
### Deployment test
6465

source/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ You can run the documentation spell checker locally (using `codespell <https://g
122122

123123
If that detects specific words that need to be ignored, add it to `codespell_whitelist <https://github.com/ros2/ros2_documentation/blob/{REPOS_FILE_BRANCH}/codespell_whitelist.txt>`_ .
124124

125+
To know more about spelling checks, refer to :ref:`Spelling check <spelling-check>`
125126

126127
View Site Through Github CI
127128
^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -164,6 +165,34 @@ To check for broken links on the site, run:
164165
165166
This will check the entire site for broken links, and output the results to the screen and ``build/linkcheck``.
166167

168+
.. _spelling-check:
169+
170+
Spelling check
171+
^^^^^^^^^^^^^^
172+
173+
The ``make spellcheck`` command scans the documentation files and flags any misspellings.
174+
If errors are detected, review the suggestions and update the pull request as necessary.
175+
176+
Some words, such as technical terms or proper nouns, maybe mistakenly flagged as misspelled.
177+
If you encounter such instances, you can add them to the ignore list to prevent them from being flagged in the future.
178+
To do this, add it to the `codespell_whitelist <https://github.com/ros2/ros2_documentation/blob/{REPOS_FILE_BRANCH}/codespell_whitelist.txt>`_ file as follows:
179+
180+
.. code-block:: text
181+
182+
empy
183+
ws
184+
lets
185+
jupyter
186+
187+
To include custom corrections that ``codespell`` should apply, you can add them to the `codespell_dictionary <https://github.com/ros2/ros2_documentation/blob/{REPOS_FILE_BRANCH}/codespell_dictionary.txt>`_ file as follows:
188+
189+
.. code-block:: text
190+
191+
amnet->ament
192+
colcn->colcon
193+
rosabg->rosbag
194+
rosdistroy->rosdistro
195+
167196
Migrating Pages from the ROS Wiki
168197
---------------------------------
169198

0 commit comments

Comments
 (0)