Skip to content

autowarefoundation/autoware-spell-check-dict

Repository files navigation

autoware-spell-check-dict

Description

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.

How to contribute

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 or pre-commit hook (if you set it up).

{
  "words": [
    "add-word1-here",
    "add-word2-here",
    "add-word3-here",
    "aarch",
    "abstractmethod",
    "...",
    "..."
  ]
}

Easy-to-add a word using workflow

With the add-word workflow, you can create a pull request to add a word to .cspell.json.

image

Automatic cleanup of unused words

With the autoclean workflow, automated Pull Requests are created to remove unused words from .cspell.json.

Update upstream dictionaries

In package.json, the following upstream dictionaries are used as dependencies.

  • @cspell/dict-en-gb
  • @cspell/cspell-bundled-dicts
  • @tier4/cspell-dicts: Provided by GitHub repository

To update them, run the following command and send a pull-request to this repository.

Note: autoclean-cspell-dict.yaml workflow has update feature to keep the dictionaries up-to-date automatically.

# Update specific packages (RECOMMENDED)
npm update @tier4/cspell-dicts

# Update all packages (potentially including breaking changes)
npm update

How to check spelling with the dictionary in your local environment

Ubuntu 22.04 or later

Requirement: Node.js >= v20

# 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 >= v20
$ node -v
v24.4.1

# Install cspell and autoware-spell-check-dict as a global package from GitHub
$ npm install -g cspell https://github.com/autowarefoundation/autoware-spell-check-dict

# Check spelling
$ cspell -c '@tier4/autoware-spell-check-dict/.cspell.json' /path/to/src/*.cpp /path/to/include/*.hpp

# Check all files using glob patterns
$ cspell -c '@tier4/autoware-spell-check-dict/.cspell.json' '**/*.{cpp,hpp,xml,md}'

# Alternative way: Using npm exec without global installation
$ npx --package cspell --package https://github.com/autowarefoundation/autoware-spell-check-dict cspell -c '@tier4/autoware-spell-check-dict/.cspell.json' '**/*.{cpp,hpp,xml,md}'

Visual Studio Code

Please install Code Spell Checker and be sure to add the followings to settings.json.

"cSpell.languageSettings": [
    {
        "languageId": "c,cpp,python",
        "allowCompoundWords": false
    }
]

Credits

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.

About

A dictionary for spell-checking Autoware-specific terms in documentation and code.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors