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

Checking command line option typos #2726

Closed
szepeviktor opened this issue Feb 5, 2023 · 4 comments
Closed

Checking command line option typos #2726

szepeviktor opened this issue Feb 5, 2023 · 4 comments
Labels

Comments

@szepeviktor
Copy link
Contributor

szepeviktor commented Feb 5, 2023

Hello!
I'm a happy user of codespell. Including codespell in CI setups I contribute to open-source projects.

#     -m recent --update --seconds 600 --hitcount 6 --name SSHide --rsource \

There is a comment in one of my fail2ban config files.
rsource is a misspelling included in data/dictionary.txt

How can it be found?
changing it to -- rsource causes it to be found.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Feb 5, 2023

BTW rsource is a valid iptables option

@szepeviktor
Copy link
Contributor Author

Could the word regex be the cause?

word_regex_def = "[\\w\\-'’`]+"

@DimitriPapadopoulos
Copy link
Collaborator

We need - to catch words such as auto-detect.

Perhaps the regex could be modified to not catch leading or trailing dashes. You may define an alternative regex using option -r.

@szepeviktor
Copy link
Contributor Author

I think regexp-based operation may ignore some misspellings.
Parsing code may work better https://github.com/crate-ci/typos

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

No branches or pull requests

2 participants