You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with this awesome tool. One option I would love to see is a way to specify file ranges to spell check. Although could be considered controversial, some people might only want to spell check their git staged hunks, which helps avoid having larger PRs.
This gets pretty close:
git status -s | cut -c 4- | typos --file-list -
But will of course, spell-check the complete file, ideally I'd like to specify ranges for hunks so that when I apply suggestions I don't introduce new line changes.
The text was updated successfully, but these errors were encountered:
Know of any prior art for how users can specify hunks? Enumerating how other tools handle this today would help with the design and evaluation of this proposal.
Also, what would the workflow look like for this? Having an idea of what it would take to adopt this feature can give an idea of how likely it is to be adopted which can affect the priority of it.
Thinking twice, I can only think of one practical form for this feature, I imagine that the output of git diff is parsed to extract line ranges and file names. I don't think it would be practical to pass a range per file manually, instead a patch file or the output of git diff is used, since it has all the information required to process specific parts of the files.
Something along the lines of:
git diff | typos --hunks -
I'll look around for other tools process hunks and will share my findings if any.
Hi,
I've been playing around with this awesome tool. One option I would love to see is a way to specify file ranges to spell check. Although could be considered controversial, some people might only want to spell check their git staged hunks, which helps avoid having larger PRs.
This gets pretty close:
But will of course, spell-check the complete file, ideally I'd like to specify ranges for hunks so that when I apply suggestions I don't introduce new line changes.
The text was updated successfully, but these errors were encountered: