An Autoware-specific word dictionary for spell checking.
The dictionary contains some words which are found in documents and source code of Autoware, but not in common English dictionaries.
The words in the dictionary are sorted by the command sort --ignore-case | uniq
.
Just edit .cspell.json
as follows and send a pull-request to this repository. Thanks!
The words you inserted into the json will be sorted automatically by GitHub Actions.
{
"words": [
"add-word1-here",
"add-word2-here",
"add-word3-here",
"aarch",
"abstractmethod",
"...",
"..."
]
}
With the add-word workflow, you can create a pull request to add a word to .cspell.json
.
Requirement: Node.js >= v12
# Install Node.js
# See the latest instruction https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
# The following command installs Node.js LTS
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
$ sudo apt install nodejs
# Make sure that Node.js >= v12
$ node -v
v16.13.0
# Install a spell checker (cspell) using npm
$ sudo npm install -g cspell
# Install additional dictionaries
$ npm install -g yarn
$ yarn global add https://github.com/tier4/cspell-dicts
# Copy the dictionary into your environment
$ cd /your-project-dir
$ wget -O .cspell.json https://raw.githubusercontent.com/autowarefoundation/autoware-spell-check-dict/main/.cspell.json
# Check spelling
$ cspell /path/to/src/*.cpp /path/to/include/*.hpp
# Or
$ find . -name '*.cpp' -o -name '*.hpp' -o -name '*.xml' -o -name '*.md' | xargs cspell
# Or
$ find . -type d -name '.git' -prune -o \
-type d -name 'vendor' -prune -o \
-type f -name '*' \
-not -name '*onnx' \
-not -name '*.cu' \
-not -name '*.pcd' \
-not -name '*cspell*' \
-not -name '*compile_commands.json' \
-not -name '*.caffemodel' \
-not -name '*.svg' \
-not -name '*.pcd' \
| xargs cspell > cspell_all
Please install Code Spell Checker and be sure to add the followings to settings.json
.
"cSpell.languageSettings": [
{
"languageId": "c,cpp,python",
"allowCompoundWords": false
}
]
This repository was mirrored from tier4/autoware-spell-check-dict on 2024-11-27.
The original repository was created by TIER IV, Inc..
We extend our gratitude to the original authors and contributors for their efforts and dedication.