Added spellcheck utility to documentation build
Uses the sphinxcontrib-spelling extension and requires PyEnchant and aspell-en to be installed. Adds the optional make target 'spelling' which produces the file spelling/output.txt. It contains all words it detects. Due to the large number of false positives, words in utils/sphinx-config/false_positives.txt are ignored.
This commit is contained in:
@ -299,4 +299,11 @@ more information about the code and its uses.
|
||||
|
||||
epub_author = 'The LAMMPS Developers'
|
||||
|
||||
# configure spelling extension if present
|
||||
import importlib.util
|
||||
spelling_spec = importlib.util.find_spec("sphinxcontrib.spelling")
|
||||
if spelling_spec:
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
|
||||
spelling_lang='en_US'
|
||||
spelling_word_list_filename='false_positives.txt'
|
||||
|
||||
Reference in New Issue
Block a user