Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic spelling check by sphinx-spelling ext. #4998

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
SOURCE = source
OUT = build
LINKCHECKDIR = $(OUT)/linkcheck
SPELLCHECKDIR = $(OUT)/spellcheck
PYTHON := python3
ifeq ($(OS),Windows_NT)
PYTHON := python
Expand All @@ -28,6 +29,11 @@ lint:
test:
doc8 --ignore D001 --ignore-path build

spellcheck:
$(BUILD) -b spelling $(OPTS) $(SOURCE) $(SPELLCHECKDIR)
@echo
@echo "Check finished. Report is in $(SPELLCHECKDIR)."

linkcheck:
$(BUILD) -b linkcheck $(OPTS) $(SOURCE) $(LINKCHECKDIR)
@echo
Expand Down
8 changes: 8 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,16 @@
'sphinx_rtd_theme',
'sphinx_sitemap_ros',
'sphinxcontrib.mermaid',
"sphinxcontrib.spelling",
]

# Spelling configuration
spelling_show_suggestions = False
spelling_ignore_acronyms = True
spelling_ignore_case = True
spelling_ignore_digits = True
Comment on lines +92 to +94
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the result with this repo, these configurations do not really help to reduce the warnings.

#spelling_word_list_filename = "spelling_wordlist.txt"

# Intersphinx mapping

intersphinx_mapping = {
Expand Down
3 changes: 2 additions & 1 deletion docker/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ RUN apt-get update && \
graphviz \
locales \
make \
python3-pip && \
python3-pip \
enchant-2 && \
rm -rf /var/lib/apt/lists/*

RUN locale-gen en_US en_US.UTF-8
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ sphinx-multiversion
sphinx-rtd-theme
sphinx-tabs
sphinxcontrib-mermaid
sphinxcontrib.spelling
1 change: 1 addition & 0 deletions source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rviz