Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly matching partial words #51

Open
patrickdepinguin opened this issue Dec 17, 2024 · 2 comments
Open

Incorrectly matching partial words #51

patrickdepinguin opened this issue Dec 17, 2024 · 2 comments

Comments

@patrickdepinguin
Copy link

misspell-fixer 0.5 reports a failure "carefull" on the word "carefully" .
I.e. it matches partial words, which is not correct. The word "carefully" is spelled correctly, only a separate word "carefull" is not.

The tool should only look at complete words to avoid false positives.

@vlajos
Copy link
Owner

vlajos commented Dec 17, 2024

Hi,
Thanks for reporting this issue.
Could you please share the exact steps with me about how to reproduce this?

@patrickdepinguin
Copy link
Author

Here are the steps:

$ mkdir /tmp/spell
$ cd /tmp/spell
$ printf "carefully and sucessfully\nsucessfully\n" > text
$ cat text                                                               
carefully and sucessfully
sucessfully

$ docker run --rm -v (pwd):/work 'vlajos/misspell-fixer:v0.5' -fnvugRVD .    
misspell-fixer: -f Enable fast mode. (Equivalent with -P4)
misspell-fixer: -n Disable backups.
misspell-fixer: -v Enable verbose mode.
misspell-fixer: -u Enable unsafe rules.
misspell-fixer: -g Enable GB to US rules.
misspell-fixer: -R Enable rare rules.
misspell-fixer: -V Enable very-rare rules.
misspell-fixer: -D Enable rules from lintian.debian.org / spelling.
misspell-fixer: Target directories: .
misspell-fixer: Real run (-r) has not been enabled. Files will not be changed. Use -r to override this.
misspell-fixer: Your grep version is +zstd which is at least the optimal: 2.28.
misspell-fixer: Iteration 0: prefiltering.
misspell-fixer: Results of prefiltering: (filename:line:pattern)
./text:1:carefull
./text:1:sucessfully
./text:2:sucess
./text:2:sucessfully
misspell-fixer: Iteration 0: processing.
misspell-fixer: actual file: ./text
misspell-fixer: temp file: ./text.51
misspell-fixer: Iteration 0: done.

Notice two things:

  • carefull flagged incorrectly, as 'carefully' is a valid word (originally reported issue)
  • when sucessfully is on a line of its own (line 2), misspell-fixer flags sucess as a violation, but this doesn't happen for the first line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants