Bug 63923

Summary: Some more spelling errors
Product: Apache httpd-2 Reporter: Jens Schleusener <Jens.Schleusener>
Component: AllAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Jens Schleusener 2019-11-13 20:50:25 UTC
On the FOSS server fossies.org I recently added a new feature "Source code misspelling reports". Animated by the bug report https://bz.apache.org/bugzilla/show_bug.cgi?id=62960 I have now done such a check for the current trunk version of "httpd" (since there some spelling errors contained still in the release version are already patched):

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/codespell.html

That URL hopefully redirects always to the last available report, currently to

 https://fossies.org/linux/test/httpd-trunk.191113_1757.tar.bz2/codespell.html

Since I am neither a real coder nor a native or good English speaker I have not yet created a patch file since the risk is too high that something would be wrongly corrected. But if that is really required I would do that but only for the very obvious spelling errors and typos.

The analysis, that uses as basis the command line tool "codespell" (https://github.com/codespell-project/codespell) has found still 261 occurrences of 194 different spelling error types (so most of the errors occur only once).

Maybe some are False Positives but to minimize them some matched words were for "httpd" manually excluded (see the according page
https://fossies.org/linux/test/httpd-trunk.tar.bz2/codespell_conf_info.html)

Especially also the words "depandancies" (130 matches) and "creater" (48 matches) were finally excluded to make the page clearer, but not in a first run that was done for the last httpd release 2.4.41:

 https://fossies.org/linux/www/httpd-2.4.41.tar.bz2/codespell.html

By the way, the reports show the top found spelling error types and a sortable list of all found errors together with the suggested fixes, the affected member files and the according line numbers. Clicking on a red colored spelling error in the "top" list jumps to the first match in the actual spelling error occurrence list. Clicking on a matching member file let you browse that file while jumping to the according red marked line containing the error (in some cases the matching line may lie in the neighborhood).

And a further remark: Most errors are found "only" in the documentation or in the code comments, but at least the following seven are in the code itself (but probably and hopefully they are uncritical):

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/modules/dav/main/mod_dav.h?M=1324#l_1321
 "resrouce" -> "resource"

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/modules/md/md_acme_order.c?M=516#l_511
 "consideres" -> "considers" or "considered"

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/modules/http2/h2_session.c?M=388#l_386
 "errror" -> "error"

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/server/mpm/winnt/service.c?M=1160#l_1156
 "Adminstrator" -> "Administrator" (multiple occurrences)

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/docs/server-status/server-status.lua?M=682#l_681
 "avaialable" -> "available"

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/modules/arch/win32/mod_isapi.c?M=181#l_179
 "concatinated" -> "concatenated"
 
 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/support/ab.c?M=1319#l_1317
 "Connnection" -> "Connection"

Maybe that information helps a little bit.

Jens
Comment 1 Christophe JAILLET 2019-11-14 17:29:09 UTC
Nice.

I'll give a look at it, especially on the doc and on the one you have spotted above.
Thx.
Comment 2 Jens Schleusener 2020-01-18 10:31:49 UTC
I have made a new spelling check for the current trunk version so

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/codespell.html

is now an alias for

 https://fossies.org/linux/test/httpd-trunk.200118_1101.tar.bz2/codespell.html

After all, roughly 7% of the errors seem to have been corrected.
Comment 3 Jens Schleusener 2020-01-30 18:02:56 UTC
Again a new spelling check for the current trunk version was done so

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/codespell.html

is now an alias for

 https://fossies.org/linux/test/httpd-trunk.200130_1654.tar.bz2/codespell.html

As a small new feature there was added a - also sortable - one letter column ("T") indicating the context type of the found spelling error:

 Abbreviations for the current supported context types:
  t = text file line
  c = commented line
  C = Comment block
  F = Formatted text file line
  D = Debug string
  E = Error string
  P = Print string
  Q = Quoted string
  ? = Unassigned context (maybe source code)

That may make it in some cases easier (especially after sorting) to found the more interesting errors.

By the way, the line numbers of the especially mentioned errors 4 and 7 have changed slightly:

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/server/mpm/winnt/service.c?M=1162#l_1157
 "Adminstrator" -> "Administrator" (also at line 806, 962 and 1052)

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/httpd-trunk/support/ab.c?M=1320#l_1318
 "Connnection" -> "Connection"
Comment 4 Christophe JAILLET 2020-02-15 15:46:06 UTC
r1873985 should have fixed most, if not all, all them.

Could you re-run the analysis?
Comment 5 Jens Schleusener 2020-02-15 16:58:42 UTC
It looks much better!

I have now automated the process (but using the GitHub mirror) so under the given URL

 https://fossies.org/linux/test/httpd-trunk.tar.bz2/codespell.html

one can always find a fresh analysis (currently with hopefully max. 10 minutes delay after the sources were changed).

And the same now additionally also for 2.4.x

 https://fossies.org/linux/test/httpd-2.4.x-snap.tar.bz2/codespell.html
Comment 6 Christophe JAILLET 2020-02-15 21:51:51 UTC
Great, Thx :)
Comment 7 Jens Schleusener 2021-04-18 09:53:09 UTC
Since a new T&R is scheduled next week, I would like to refer again to the page

 https://fossies.org/linux/test/httpd-2.4.x-snap.tar.bz2/codespell.html

While some typos have been fixed, of course some have been added and others have been rediscovered through expanded dictionaries. 

By the way, a history page has been added

 https://fossies.org/linux/test/httpd-2.4.x-snap.tar.bz2/codespell_hist.html

(caused by later code changes the given line numbers may be not always correct).

If false positives exist (which is likely), please report them so they can be corrected.