Giter Site home page Giter Site logo

granddaifuku / cargo-spellcheck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drahnr/cargo-spellcheck

0.0 0.0 0.0 78.29 MB

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

License: Apache License 2.0

Rust 100.00%

cargo-spellcheck's Introduction

cargo-spellcheck

crates.io CI commits-since rust 1.57.0+ badge

Check your spelling with hunspell and/or nlprule.

Use Cases

Run cargo spellcheck --fix or cargo spellcheck fix to fix all your documentation comments in order to avoid nasty typos all over your source tree. Meant as a helper simplifying review as well as improving CI checks after a learning phase for custom/topic specific lingo.

cargo-spellcheck is also a valuable tool to run from git commit hooks or CI/CD systems.

Check For Spelling and/or Grammar Mistakes

cargo spellcheck check
error: spellcheck
   --> src/main.rs:44
    |
 44 | Fun facets shalld cause some erroris.
    |            ^^^^^^
    | - shall or shall d
    |

Apply Suggestions Interactively

cargo spellcheck fix
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

Installation

cargo install --locked cargo-spellcheck

The --locked flag is the preferred way of installing to get the tested set of dependencies.

Completions

cargo spellcheck completions for autodetection of your current shell via $SHELL,

or

cargo spellcheck completions --shell zsh

to explicitly specify your shell type.

Commonly it's use like this from your shell's .rc* file:

source <(cargo spellcheck completions)

Note: There is a relevant clap issue (#3508) that makes this fail in some cases.

๐ŸŽˆ Contribute!

Contributions are very welcome!

Generally the preferred way of doing so, is to comment in an issue that you would like to tackle the implementation/fix.

This is usually followed by an initial PR where the implementation is then discussed and iteratively refined. No need to get it all correct the first time!

Documentation

cargo-spellcheck's People

Contributors

drahnr avatar kuabem avatar snasphysicist avatar laysauchoa avatar granddaifuku avatar zhiburt avatar hunger avatar dependabot[bot] avatar zohnannor avatar stusmall avatar edjopato avatar sunfishcode avatar aatifsyed avatar guillaumegomez avatar meithecatte avatar nashley avatar satakuma avatar orhun avatar rhysd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.