Check your spelling with hunspell and/or languagetool.
Run cargo spellcheck --fix or cargo spellcheck fix to fix all your documentation comments
in order to avoid narsty types all over the place.
Meant as a helper simplifying review as well as possibly improving CI
after a learning phase for custom/topic specifc lingo.
cargo spellcheck has a return code 1 if any unknown words are found, and 0 on success.
zsh
cargo spellcheck check
error: spellcheck
--> src/main.rs:44
|
44 | Fun facets shalld cause some erroris.
| ^^^^^^
| - shall or shall d
|
zsh
cargo spellcheck fix --interactive
Improvement requests tracked in issue #7.
error: spellcheck(Hunspell) --> /media/supersonic1t/projects/cargo-spellcheck/demo/src/nested/justtwo.rs:2 | 2 | Beto | ^^^^ (2/2) Apply this suggestion [y,n,q,a,d,j,e,?]? Beeton Bet o ยป Beta Bets Bet Be-to Be to Veto Beth
cargo-spellcheck checkhunspelllanguagetool http APImarkdown aware
```rust as virtual files skeptic-likeREADME.md filescargo-spellcheck fix --interactivecrossterm...cargo-spellcheck fixfix --interactive is passedhunspell and languagetool are currently the two supported featuresets.
```toml
[LanguageTool] url = "127.0.0.1:8010"
[Hunspell]
.dic filelang = "en_US"
searchdirs = [] extradictonaries = [] ```
cargo install cargo-spellcheck
To increase verbosity use CARGO_SPELLCHECK=cargo_spellcheck=trace to see internal details or
add -v (multiple) to increase verbosity.
Requires the native library
```sh
dnf install -y hunspell-devel
apt install -y hunspell-dev
brew install hunspell ```
and building should succeed just fine.
Run a instance of the LanguageTool server i.e. as container .