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

Reports spelling error in a format string #3249

Open
bijoua29 opened this issue Dec 12, 2023 · 4 comments
Open

Reports spelling error in a format string #3249

bijoua29 opened this issue Dec 12, 2023 · 4 comments
Assignees
Labels

Comments

@bijoua29
Copy link

I have a format string passed into scanf that is for form "HR%fPR%f" and codespell is complaining about fPR being incorrectly spelled.

fPR ==> for, far, fps

@DimitriPapadopoulos
Copy link
Collaborator

That's expected: codespell merely splits text into words using the following regexp, then searches each word in dictionaries of typos.

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

Just ignore fpr.

@bijoua29
Copy link
Author

Ok, thanks for the response. There doesn't seem to be a way to ignore this for a specific line of code. I assume I can only exclude 'fpr' globally or exclude the whole file.

@peternewman
Copy link
Collaborator

See https://github.com/codespell-project/codespell#usage specifically:

codespell -x FILE, --exclude-file=FILE
Ignore whole lines that match those in FILE. The lines in FILE should match the to-be-excluded lines exactly.

@policeakshithreddy
Copy link

I would like to work on this issue

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

4 participants