Elegant build system verifies spelling using the yaspeller tool.
In its default mode, the
yaspeller tool will scan everything in a Markdown
document except for text encapsulated within code blocks.
yaspeller is a useful tool, it is not foolproof. When scanning the documentation
files, it often requires a bit of assistance in determining how to properly handle words which
do not appear in the standard dictionary.
The root directory
of the project contains
the project dictionary
with a list of words that
yaspeller should consider acceptable.
Words added to the
dictionary in lower case will match upper case and lower case versions of the word, while words
added with any capitalization will force
yaspeller to perform a case-sensitive match.
End a line with
<!-- yaspeller ignore --> suffix to tell the
yaspeller tool to ignore
the entire line.
To ignore a block of text, put
<!-- yaspeller ignore:start --> before the block.
<!-- yaspeller ignore:end --> where you want spell checking to resume.
Similar to the other checks that are performed on every submission, a spell check failure will cause the build to fail.
Addressing any failures reported locally by this tool results in a smaller turn around time in getting any spelling mistakes addressed. This in turn will save time when submitting changes in a Pull Request, as you have already dealt with any errors that this tool may report.
You can install the
yaspeller package using either NPM (Node.js) or Yarn as follows:
npm install -g yaspeller
yarn global add yaspeller
To invoke the
yaspeller package for the documentation files for the Elegant project, go to
the root directory of your local repository and enter the following command:
yaspeller --only-errors documentation/content/ *.md
When executed, the
yaspeller tool will recursively scan all of the
*.md files under the
documentation/content/ directory from the root of your local repository.
flags merely restricts any of the output to any errors that occur, instead of an ongoing stream
of what files it is scanning. As omitting the
--only-errors flag only affects the output
and not the detection of spelling mistakes, feel free to not use it when running locally.