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.
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
error: spellcheck(Hunspell) --> /media/supersonic1t/projects/cargo-spellcheck/src/literalset.rs:291 | 291 | Returns literl within the Err variant if not adjacent | ^^^^^^ (13/14) Apply this suggestion [y,n,q,a,d,j,e,?]? lite litter litterer liter l liters literal liter ยป a custom replacement literal
cargo spellcheck
can be configured with -m <code>
to return a non-zero return code if
mistakes are found instead of 0
.
cargo-spellcheck check
hunspell
languagetool
http APImarkdown
aware
README.md
files #37book.toml
file trees #62cargo-spellcheck fix --interactive
crossterm
...
#42fix --interactive
is passed #41cargo-spellcheck fix
#45hunspell
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.
Windows currently suffers from an issue of the inability to build hunspell
(the C lib) easily on windows or specify where it exists, see #14 for details, there is an upcoming upstream fix in hunspell-sys/#2.
Requires the native library
```sh
dnf install -y hunspell-devel clang
apt install -y libhunspell-dev clang
brew install hunspell llvm ```
and building should succeed just fine.
Run a instance of the LanguageTool server i.e. as container.