drahnr / cargo-spellcheck

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interactive fixing seems buggy

dpc opened this issue · comments

Describe the bug

After trying out cargo-spellcheck I've noticed that it often asks for the same words/lines multiple times.

Also, I lost some changes that I did want to apply multiple times, not sure if it was due to using y instead of enter key, or something else.

I did some config changes modifications, for the record. Not sure if these are relevant or not.

It's getting late and I was just trying it out. Just wanted to give a short feedback. Please feel free to close.

I'll probably not keep using cargo-spellcheck due to amount of work it would involve to spell-check the whole project. I guess it would much more useful and practical to have it somehow check only lines being added/changed and not the whole project.

Hey, thanks for the candid feedback. You can achieve checking only changed files using `git diff --files $branchbase..HEAD which usually is the preferred mode of usage. Line based is more difficult since the tokenizer requires context of possibly multiple adjacent lines.

If there are multiple issues in the same line or detected by multiple checkers you get duplicate suggestions which might break individual lines. See issue #10 #232 #171

As always, I am very happy to review PRs or onboard people to the codebase

You can achieve checking only changed files using `git diff --files $branchbase..HEAD which usually is the preferred mode of usage.

Thank you. That changes things. I'll give it a try.

If there are multiple issues in the same line or detected by multiple checkers you get duplicate suggestions which might break individual lines.

Yes. That might be it. Unfortunately out codebase has so many typos in comments, that I'm hitting it all the time. Though I've also noticed my actions just ... getting lost.

Is the codebase open source? Could you provide a sample doccomment file where the issue pops up?