
* Add formatting checks. Co-authored-by: Sarena Meas <sarem@amazon.com> Co-authored-by: Archit Aggarwal <architag@amazon.com>
Pre-requisites to running the spell check scripts
-
In your GNU environment, install the spell and getopt programs. Use the following commands in Debian distributions, to install the packages (getopt is part of the
util-linux
package):apt-get install spell apt-get install util-linux
-
Add the folder containing the tools/spell/ablexicon, tools/spell/extract-comments, and tools/spell/find-unknown-comment-words scripts to your system's PATH.
export PATH=<REPO_ROOT>/tools/spell:$PATH
How to create a lexicon.txt for a new directory.
-
Ensure there does not exist a file called "lexicon.txt" in the directory. Run the following command to create a lexicon.txt for the directory:
find-unknown-comment-words -d <PATH>/<TO>/<DIRECTORY> > <PATH>/<TO>/<DIRECTORY>/lexicon.txt
-
Check the contents of // for any misspelled words. Fix them in your library's source code and delete them from the lexicon.txt.
How to run for changes to an existing directory containing lexicon.txt file.
-
If there exists a lexicon.txt in a directory, run the following command:
find-unknown-comment-words -d <PATH>/<TO>/<DIRECTORY>
-
Add any non-dictionary correctly spelled words to ///lexicon.txt. Fix any misspelled words in your code comment change.