drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar
Apache License 2.0
314 stars 32 forks source link

Is there way to skip over doc links in comments? #294

Closed stusmall closed 1 year ago

stusmall commented 1 year ago

In my project I'm making heavy use of links to other types in doc strings. Because of the capitalization of rust type names, it can cause a lot of false positives. For example:

error: spellcheck(Hunspell)
   --> /home/stusmall/Workspace/bowbend/bowbend_core/src/service_detection/framework/rule_results.rs:12
    |
 12 |  Returns the [RuleId] of the Rule this result belongs to.  This isn't
    |               ^^^^^^
    | - Rule Id, Ruled, or Rule-id
    |
    |   Possible spelling mistake found.

Does cargo spellcheck have a way to skip over these links? Or is this better handled by a rule in the dictionary file? If so do you have a rule handy to ignore anything inside brackets?

Once again, huge thank you for this project. It's helped keep my documentation much cleaner.

stusmall commented 1 year ago

Right after posting this I saw that this is mentioned in the FAQ

drahnr commented 1 year ago

It's always good to know people read the FAQ and it actually contains useful info :+1: