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

WIP - spell checking #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
63 changes: 63 additions & 0 deletions docs/development/spell-check.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Spell checking
==============

Ultimately, some auto spell checking for relevant files (and even git commit
messages) would be awesome, but for now, we'll settle with manual install and
setup.

Install
-------

apt update
apt install aspell aspell-en

Usage - non-interactive
-----------------------

To get a list of words that the spellchecker doesn't recognise, first cd to the
appliance build code directory, then::

export COMMON=$FAB_PATH/common
cat changelog | aspell list -a \
--encoding=utf-8 \
--personal=$PWD/spelling/.dic \
--add-extra-dicts=$PWD/spelling/dic \
--add-extra-dicts=$COMMON/spelling/common.dic \
--add-extra-dicts=$COMMON/spelling/common_changelog.dic \
> MIS_SPELLED.changelog

export COMMON=$FAB_PATH/common
cat README.rst | aspell list -a \
--encoding=utf-8 \
--personal=$PWD/spelling/.dic \
--add-extra-dicts=$PWD/spelling/dic \
--add-extra-dicts=$COMMON/spelling/common.dic \
--add-extra-dicts=$COMMON/spelling/common_readme.dic \
> MIS_SPELLED.readme

Usage - interactive
-------------------

It is suggested that you run the above and add any new words (that are spelled
right) to the spelling/dic (or one of the common dic files). Once you are ready
to interactively run through this, you can do it like this::

export COMMON=$FAB_PATH/common
aspell -c changelog \
--dont-backup \
--encoding=utf-8 \
--personal=$PWD/spelling/.dic \
--add-extra-dicts=$PWD/spelling/dic \
--add-extra-dicts=$COMMON/spelling/common.dic \
--add-extra-dicts=$COMMON/spelling/common_changelog.dic

export COMMON=$FAB_PATH/common
aspell -c README.rst \
--dont-backup \
--encoding=utf-8 \
--personal=$PWD/spelling/.dic \
--add-extra-dicts=$PWD/spelling/dic \
--add-extra-dicts=$COMMON/spelling/common.dic \
--add-extra-dicts=$COMMON/spelling/common_readme.dic

sort -f | uniq