This is a developer docs directory. Not meant for end users.
As part of the CI process, we run codespell to find potential typos in our code base. This section describes how to configure and use it.
codespell locally, install it either using the
or using a package manager specific to your Linux distribution.
codespell installed, run the following command to run spell checking locally:
Ignoring specific words
codespell detects some words as typos, like
IAM, which cause the CI to
report errors. To resolve that, we define our list of ignored words in the
which is then passed to
codespell via the
If you find that some word you used should be ignored, add it to this file.
Ignoring vendored files
Lokomotive ships some 3rd party code like vendored Go dependencies and Helm charts, which are maintained
by other people and may also contain some typos. It is recommended to configure
codespell to SKIP those
files from checking, instead of FIXING them in our repository, to avoid deriving from upstream code, which
may make the update process of this code more difficult in the future (merge conflicts, extensive diffs etc.).
To skip some file or directory (recursively) from spell checking, add the path to
The content of this file is then passed to the
--skip flag of
Additionally, if time allows, consider fixing the found typos in the respective upstream projects.
Spell checking git commit messages
Spell checking of git commit messages is not done as part of the CI process, but it is recommended to do it locally before submitting patches.
To check for typos in commit messages of your feature branch, you can run the following command:
git log master..HEAD | codespell -
It will spell check both commit messages and new code, so it is recommended to first fix typos in the code before running it, to only find typos in commit messages.