-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
follow-up of #4997
currently codespell checker uses ony builtin dictionaries, but we could have ROS 2 dictionary to let the codespell get them for more documentation quality.
I tried some experimental things like below, and i found that ignore-words cannot work case-sensitive. that does not let the codespell detect the words from the dictionary.
see more details for codespell-project/codespell#3638.
diff --git a/Makefile b/Makefile
index e8a706bb..d783a687 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ test:
doc8 --ignore D001 --ignore-path build
spellcheck:
- git ls-files '*.md' '*.rst' | xargs codespell --ignore-words=codespell_whitelist.txt --skip="source/Releases/*"
+ git ls-files '*.md' '*.rst' | xargs codespell -I codespell_whitelist.txt -D codespell_dictionary.txt,- --skip="source/Releases/*"
linkcheck:
$(BUILD) -b linkcheck $(OPTS) $(SOURCE) $(LINKCHECKDIR)
diff --git a/codespell_dictionary.txt b/codespell_dictionary.txt
new file mode 100644
index 00000000..1c1fb1c1
--- /dev/null
+++ b/codespell_dictionary.txt
@@ -0,0 +1 @@
+ROS2->ROS 2
diff --git a/codespell_whitelist.txt b/codespell_whitelist.txt
index b7860a05..e2a3b1ba 100644
--- a/codespell_whitelist.txt
+++ b/codespell_whitelist.txt
@@ -1 +1,2 @@
empy
+ros2what the above modification wants to do is to catch ROS2 and suggest ROS 2(with space) but ros2. this is because we have many words ros2 for command line examples such as ros2 topic echo xxx.
but this is not working because of codespell-project/codespell#3638.
after all, what we can do at this moment is that case-insensitive spell check and suggestion for ROS 2.
if you have any idea or suggestions, please post it here. i am all ears 👂👂👂