Skip to contentSkip to conversation

Some misspelling errors in the git release 2.24.0

DISCUSSION Fossies Administrator 2 participants 7 messages Nov 4, 2019 – Nov 7, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

although misspelling corrections are not the most exciting issues and the spelling errors are rarely true code bugs but mostly contained in the comments and documentation parts they correction may still improve the overall quality of a software project a little bit.

In this sense I created a code misspelling report for "git" using the program "codespell"

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell.html

or version independent

https://fossies.org/linux/misc/git/codespell.html

The latter URL redirects always to the report of the last "git" release supported on Fossies (if such a report was requested resp. is existing).

Principally it's possible to make further runs not only on "git" releases but also within a separated test environment on master or branches. If you found FPs please inform me and I will rerun the analysis.

Regards

Jens

Signature · 3 lines
FOSSIES - The Fresh Open Source Software archive
mainly for Internet, Engineering and Science
https://fossies.org/
#1 lore raw
Quoted 8 lines · Fossies Administrator

Hi,

although misspelling corrections are not the most exciting issues and the spelling errors are rarely true code bugs but mostly contained in the comments and documentation parts they correction may still improve the overall quality of a software project a little bit.

Quoted 8 lines

In this sense I created a code misspelling report for "git" using the program "codespell"

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell.html

or version independent

https://fossies.org/linux/misc/git/codespell.html

Cool, thanks for sending this report along. The typos within the Documentation/ subdirectory have mostly been addressed by the en/doc-typofix branch (in next, not yet merged to master). There are also some false positives in this report (e.g. mmaped should not be changed to mapped, CREAT should not be changed to CREATE, examples in format-patch showing how to correct spelling errors need to keep their spelling errors or it won't make sense, and perhaps some others), but most of them look like actual spelling errors that should be corrected. I'll send in a patch, and mark you as the reporter of the issues.

Elijah

#2 lore raw

Hi Elijah,

Quoted 30 lines
Quoted 8 lines · Fossies Administrator

Hi,

although misspelling corrections are not the most exciting issues and the spelling errors are rarely true code bugs but mostly contained in the comments and documentation parts they correction may still improve the overall quality of a software project a little bit.

Quoted 8 lines

In this sense I created a code misspelling report for "git" using the program "codespell"

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell.html

or version independent

https://fossies.org/linux/misc/git/codespell.html

Cool, thanks for sending this report along. The typos within the Documentation/ subdirectory have mostly been addressed by the en/doc-typofix branch (in next, not yet merged to master). There are also some false positives in this report (e.g. mmaped should not be changed to mapped, CREAT should not be changed to CREATE, examples in format-patch showing how to correct spelling errors need to keep their spelling errors or it won't make sense, and perhaps some others), but most of them look like actual spelling errors that should be corrected. I'll send in a patch, and mark you as the reporter of the issues.

Quoted 1 line

Elijah

Thanks for your feedback. Yes, the words "mmaped" and "CREAT" I noticed as possible FPs but I was not really sure. And the character of the file "format-patch" I have simply overseen. So I have done a rerun and the mentioned two words and the file are now excluded.

Jens

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 18 lines · Elijah Newren
Quoted 2 lines · Fossies Administrator
Quoted 2 lines

On Mon, Nov 4, 2019 at 7:07 AM Fossies Administrator <[email protected]> wrote:

But I thought it might also be worthwhile to you to report what the false positives found by that program were; I've included them at the end of this email in the form of a patch. The places where the program seemed to struggle were:

* In dealing with translation files. It didn't recognize them as such and often tried to translate foreign words to a nearby English one.
* In handling variable names: acronyms might be similar to english words (cas, for compare and swap, looks like case), abbreviations might look like alternate words (ans, short for answer, looks like and).
* Testcases with intentional spelling errors
* Proper names that were similar to English words (Ned -> Need,

Quoted 8 lines
    Claus -> Clause)

* miscellaneous tech jargon or package names (e.g. 'filetest' module being replaced with 'file test', 'ith' as in not first or second but the item at position i being replaced with 'with', 'mmaped' being replaced with 'mapped', 'CREAT' changing to 'CREATE', 'UserA' (out of a sequence of UserB, UserC, etc.) changing to 'users', 'spawnve' function name being replaced with "spawn", 'CAs' (certificate authorities) being replaced with 'case', etc.)

Ooh, one more I remembered that I wanted to point out. It found the spelling error 'achiving', but it wanted to replace it with 'achieving' rather than the correct 'archiving'. Given that the correct is the same edit distance from the spelling error, it made me wonder whether the dictionary in use just needed to be expanded a little.

#5 lore raw
In reply to a message not in the archive

Hi Elijah,

Quoted 34 lines · Fossies Administrator
Quoted 32 lines

Hi Elijah,

Quoted 29 lines
Quoted 8 lines · Fossies Administrator

Hi,

although misspelling corrections are not the most exciting issues and the spelling errors are rarely true code bugs but mostly contained in the comments and documentation parts they correction may still improve the overall quality of a software project a little bit.

Quoted 8 lines

In this sense I created a code misspelling report for "git" using the program "codespell"

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell.html

or version independent

https://fossies.org/linux/misc/git/codespell.html

Cool, thanks for sending this report along. The typos within the Documentation/ subdirectory have mostly been addressed by the en/doc-typofix branch (in next, not yet merged to master). There are also some false positives in this report (e.g. mmaped should not be changed to mapped, CREAT should not be changed to CREATE, examples in format-patch showing how to correct spelling errors need to keep their spelling errors or it won't make sense, and perhaps some others), but most of them look like actual spelling errors that should be corrected. I'll send in a patch, and mark you as the reporter of the issues.

Quoted 1 line

So, I used your codespell program

That seems to be a misunderstanding: I'm not the author of the codespell program but I only use that program to detect spelling errors and point to their existence while offering the option to inspect the context of the probably misspelled words in a fast and comfortable way via a Web page.

Quoted 19 lines

to catch all these and turned
en/doc-typofix into a series of patches to fix all the errors:
https://public-inbox.org/git/[email protected]/

But I thought it might also be worthwhile to you to report what the false positives found by that program were; I've included them at the end of this email in the form of a patch. The places where the program seemed to struggle were:

* In dealing with translation files. It didn't recognize them as such and often tried to translate foreign words to a nearby English one.
* In handling variable names: acronyms might be similar to english words (cas, for compare and swap, looks like case), abbreviations might look like alternate words (ans, short for answer, looks like and).
* Testcases with intentional spelling errors
* Proper names that were similar to English words (Ned -> Need,

Quoted 8 lines

Claus -> Clause)
* miscellaneous tech jargon or package names (e.g. 'filetest' module being replaced with 'file test', 'ith' as in not first or second but the item at position i being replaced with 'with', 'mmaped' being replaced with 'mapped', 'CREAT' changing to 'CREATE', 'UserA' (out of a sequence of UserB, UserC, etc.) changing to 'users', 'spawnve' function name being replaced with "spawn", 'CAs' (certificate authorities) being replaced with 'case', etc.)

Thanks for the detailed and informed feedback. These are exactly problems that I noticed as well. Some additional ones are for e.g. words at the end of a string definition (apostrophe), mail addresses and differences between US-English and UK-English. Sometimes it's difficult to decide what to exclude: For e.g. your mentioned word "ans" is often intentionally used but often it's also a typo ("and") so FPs or FNs seem unavoidable. So codespell respectively Fossies can give only the pointers and an individual check seems always required.

Some of the according FPs are excluded by Fossies generally, some other obvious FPs are excluded by Fossies specifically for each FOSS project (see always the bold item "Codespell configuration" with a link to "Project-specific additions" or to "(no project-specific adaptions yet done)" that shows all the excluded words and directories/files).

Quoted 3 lines

Some of these would be difficult for any tool to deal with, but e.g. recognizing translation files as such and ignoring them might be interesting.

As one can see on the page

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell_conf_info.html

there are already done some according attempts.

To let run codespell with an English dictionary about directories like "translations" or "langmap" is probably in the most cases meaningless (although in such directories may be contained also "English" source code). So if one uses codespell manually one should use options like "--ignore-words-list" and "--skip" (directories, files) and can look optionally for a starting point to the values Fossies has used.

Quoted 1 line

Anyway, thanks for the report and the pointer to the tool.

Although (hopefully) most of the FPs within your list are already excluded by Fossies I will check the list to make Fossies perhaps even smarter.

Quoted 2 lines

-- 8< --
Subject: [PATCH] DO NOT MERGE: False positives from codespell -w

[... the very big list of FPs removed in this reply mail ...]

Regards

Jens

Signature · 3 lines
FOSSIES - The Fresh Open Source Software archive
mainly for Internet, Engineering and Science
https://fossies.org/
#6 lore raw
Quoted 10 lines · Fossies Administrator

Hi Elijah,

Quoted 6 lines · Fossies Administrator
Quoted 5 lines

Hi Elijah,

Quoted 2 lines

On Mon, Nov 4, 2019 at 7:07 AM Fossies Administrator <[email protected]> wrote:

Quoted 6 lines
Quoted 1 line

So, I used your codespell program

That seems to be a misunderstanding: I'm not the author of the codespell program but I only use that program to detect spelling errors and point to their existence while offering the option to inspect the context of the probably misspelled words in a fast and comfortable way via a Web page.

Oops, sorry for the misunderstanding; thanks for clearing it up.

[...]

Quoted 5 lines

Some of the according FPs are excluded by Fossies generally, some other obvious FPs are excluded by Fossies specifically for each FOSS project (see always the bold item "Codespell configuration" with a link to "Project-specific additions" or to "(no project-specific adaptions yet done)" that shows all the excluded words and directories/files).

[...]

Quoted 5 lines

As one can see on the page

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell_conf_info.html

there are already done some according attempts.

Ah, thanks for the pointer. Could you add t/t9150/svk-merge.dump and t/t9151/svn-mergeinfo.dump the the list of files to exclude? Both have the 'hapenning' typo, but both are a dump of some repository and editing it means recomputing sha1sums and whatnot for tests that just isn't worth it. I thought maybe I could get away with correcting those spelling errors but backed out once I saw further knock-on effects.

Thanks for the report and the background and corrections!

Elijah

#7 lore raw

Hi Elijah,

Quoted 32 lines · Elijah Newren
Quoted 10 lines · Fossies Administrator

Hi Elijah,

Quoted 6 lines · Fossies Administrator
Quoted 5 lines

Hi Elijah,

Quoted 2 lines

On Mon, Nov 4, 2019 at 7:07 AM Fossies Administrator <[email protected]> wrote:

Quoted 6 lines
Quoted 1 line

So, I used your codespell program

That seems to be a misunderstanding: I'm not the author of the codespell program but I only use that program to detect spelling errors and point to their existence while offering the option to inspect the context of the probably misspelled words in a fast and comfortable way via a Web page.

Oops, sorry for the misunderstanding; thanks for clearing it up.

[...]

Quoted 5 lines

Some of the according FPs are excluded by Fossies generally, some other obvious FPs are excluded by Fossies specifically for each FOSS project (see always the bold item "Codespell configuration" with a link to "Project-specific additions" or to "(no project-specific adaptions yet done)" that shows all the excluded words and directories/files).

[...]

Quoted 4 lines

As one can see on the page

https://fossies.org/linux/misc/git-2.24.0.tar.xz/codespell_conf_info.html

Quoted 7 lines
Quoted 1 line

there are already done some according attempts.

Ah, thanks for the pointer. Could you add t/t9150/svk-merge.dump and t/t9151/svn-mergeinfo.dump the the list of files to exclude? Both have the 'hapenning' typo, but both are a dump of some repository and editing it means recomputing sha1sums and whatnot for tests that just isn't worth it.

Sure, done.

Principally test directories and files seem to be a "special" area also for spelling checks.

Quoted 3 lines

I thought maybe I could get away with correcting
those spelling errors but backed out once I saw further knock-on effects.

That is one reason that only the developers should made such corrections.

Quoted 1 line

Thanks for the report and the background and corrections!

Regards

Jens

Signature · 3 lines
FOSSIES - The Fresh Open Source Software archive
mainly for Internet, Engineering and Science
https://fossies.org/