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

checkpatch: fix TYPO_SPELLING check for words with apostrophe #232

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

arnopo
Copy link
Contributor

@arnopo arnopo commented Apr 16, 2023

Fix issue OpenAMP/open-amp#483

A false positive is "doesn't".  Occurrence of the word causes checkpatch
to emit the following warning:

"WARNING: 'doesn'' may be misspelled - perhaps 'doesn't'?"

The PR is a cherry pick of from Linux kernel:
https://lore.kernel.org/all/20201201190729.169733-1-dwaipayanray1@gmail.com/T/#u

@arnopo arnopo requested a review from edmooring April 16, 2023 13:49
@arnopo arnopo added this to the Release V2023.04 milestone Apr 17, 2023
checkpatch reports a false TYPO_SPELLING warning for some words containing
an apostrophe when run with --codespell option.

A false positive is "doesn't".  Occurrence of the word causes checkpatch
to emit the following warning:

"WARNING: 'doesn'' may be misspelled - perhaps 'doesn't'?"

Modify the regex pattern to be more in line with the codespell default
word matching regex.  This fixes the word capture and avoids the false
warning.

In addition, highlight the misspelled word location by adding a caret
below the word.

Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
@arnopo arnopo merged commit 05bcc7d into OpenAMP:main Apr 20, 2023
@arnopo arnopo deleted the checkpatch branch October 16, 2023 09:41
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

Successfully merging this pull request may close these issues.

2 participants