cargo-spellcheck icon indicating copy to clipboard operation
cargo-spellcheck copied to clipboard

Interactive fixing seems buggy

Open dpc opened this issue 2 years ago • 3 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.

dpc avatar Feb 11 '23 08:02 dpc

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

drahnr avatar Feb 11 '23 08:02 drahnr

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.

dpc avatar Feb 12 '23 04:02 dpc

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

drahnr avatar Feb 12 '23 07:02 drahnr