Bug 5021: Spelling errors fixed by running scripts/spell-check.sh#578
Bug 5021: Spelling errors fixed by running scripts/spell-check.sh#578mrumph wants to merge 2 commits intosquid-cache:masterfrom
Conversation
Ran "scripts/spell-check.sh" from the Squid tree root directory.
|
Can one of the admins verify this patch? |
|
Thank you for posting this! Please close your old WIP PR #562 as obsoleted by the recently merged PR and this one. |
yadij
left a comment
There was a problem hiding this comment.
Some questions inline about whether we can do the related changes better. Mostly notes about things that have been found by the tool but need manual attention - I do not insist on those being fixed here.
| my $pid; | ||
| if($pid=fork()){ | ||
| #do parrent staf | ||
| #do parent staf |
There was a problem hiding this comment.
"staf" is also wrong here. It should be "stuff"
There was a problem hiding this comment.
The spell-check.sh script will not catch every spelling error.
That is to be expected.
In this case, "staf" is not in our white list so we are not excluding it on purpose.
It must simply that it is not listed as a misspelling in the default dictionary.
So one way to handle this would be to create our own customized dictionary.
But that is beyond the scope of this PR.
| bool hasQueue(const CommQuotaQueue*) const; ///< has a given queue | ||
| unsigned int quotaEnqueue(int fd); ///< client starts waiting in queue; create the queue if necessary | ||
| int quotaPeekFd() const; ///< retuns the next fd reservation | ||
| int quotaPeekFd() const; ///< returns the next fd reservation |
There was a problem hiding this comment.
Broken doxygen syntax. This will need a separate manual fix.
There was a problem hiding this comment.
What rule is broken here?
We can solve this by adding "retuns" to our white list.
There was a problem hiding this comment.
Amos meant that returns should be \returns. This problem is not related to this PR (and, IMO, should not be fixed in this PR).
In this change request, Amos is documenting a case where this PR modifies a line but does not fix all the problems on that line. For regular PRs, this would normally mean that the author should fix all those other problems as well. This is not a regular PR. The "author" here is, essentially, a script. That is why Amos correctly said that this problem "will need a separate manual fix".
I suggest interpreting the word "separate" as "not in this PR" :-).
There was a problem hiding this comment.
So the change from "retuns" to "returns" is not in itself an error?
Then no need to add it to the white list.
There was a problem hiding this comment.
So the change from "retuns" to "returns" is not in itself an error?
Then no need to add it to the white list.
Correct on both counts.
| static bool ParseQuotedOrToEol_; ///< The next tokens will be handled as quoted or to_eol token | ||
| static bool RecognizeQuotedPair_; ///< The next tokens may contain quoted-pair (\-escaped) characters | ||
| static bool PreviewMode_; ///< The next token will not poped from cfg files, will just previewd. | ||
| static bool PreviewMode_; ///< The next token will not popped from cfg files, will just previewd. |
There was a problem hiding this comment.
Non-English grammar. Does codespell handle grammar at all or just spelling? if not this will need a manual fix later.
There was a problem hiding this comment.
Codespell is only checking for spelling errors.
So "will not poped" should be changed to "will not be popped"?
The spell-check.sh script caught the spelling error but does not have the means to check the grammar error.
We could add "poped" to the white list, but in this case, the spelling fix is an improvement, correct?
There was a problem hiding this comment.
the spelling fix is an improvement, correct?
Correct. I am pretty sure the word "later" in the change request implies "not in this PR" :-).
This situation is very similar to #578 (comment)
src/clientStream.h
Outdated
| * correct. | ||
| * | ||
| \section WhatsInANode Whats in a node | ||
| \section WhatsInANode What's in a node |
There was a problem hiding this comment.
The informal form of "What is" breaks the doxygen outputs.
There are a few other places using informal language. Can codespell convert these spellings to formal style? "what is", "did not", "cannot", "there is", "that is" etc instead of; what's didn't can't there's that's
There was a problem hiding this comment.
This is important. We should not break Doxygen. @mrumph, after this is addressed, please see if you can generate documentation to make sure nothing got broken (by comparing before and after snapshots of [generated] files using diff -ur or similar).
There was a problem hiding this comment.
The best we can do at this point is to add words (whats) to the white list.
If we want "whats" to be automatically translated to "what is", then we would need our own customized dictionary.
There was a problem hiding this comment.
Could someone point me to documentation on how to generate documentation for Squid?
There was a problem hiding this comment.
I do not know (or remember) the official answer to your question, but you can start with running doxygen squid.dox from the root repository directory. You may need to install "doxygen" (and "graphviz") first, but that is easy to do on Ubuntu.
There are also doxygen-related commands in doc/Programming-Guide/Makefile, but that Makefile does not work out of the box for me (because its phony targets are not marked as such?). YMMV.
There was a problem hiding this comment.
If we want "whats" to be automatically translated to "what is", then we would need our own customized dictionary.
If that custom dictionary will replace the standard one (rather than just overwrite or add a few entries), then a custom dictionary is not a good solution IMO (and we should leave the desirable goal of expanding contractions alone for the time being). Otherwise, we should consider it. In other words, we are not going to maintain our own full dictionary, but we certainly can maintain a small set of the official dictionary exceptions/additions.
If a custom dictionary is not a good solution (as discussed above), then whitelisting whats to address this change request (assuming What's breaks Doxygen) is a good solution IMO.
| fprintf(stderr, PROGRAM_NAME " WARNING, LDAP search error, trying to recover'%s'\n", ldap_err2string(rc)); | ||
| ldap_msgfree(res); | ||
| /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */ | ||
| /* try to connect to the LDAP server again, maybe my persistent conexion failed. */ |
There was a problem hiding this comment.
"conexion" is non-English - it should be "connection". Here and elsewhere.
There was a problem hiding this comment.
This is not in our white list so it is probably not in the default dictionary.
| fprintf(stderr, "Usage: " PROGRAM_NAME " -b basedn -f filter [options] ldap_server_name\n\n"); | ||
| fprintf(stderr, "\t-A password attribute(REQUIRED)\t\tUser attribute that contains the password\n"); | ||
| fprintf(stderr, "\t-l password realm delimiter(REQUIRED)\tCharater(s) that devides the password attribute\n\t\t\t\t\t\tin realm and password tokens, default ':' realm:password\n"); | ||
| fprintf(stderr, "\t-l password realm delimiter(REQUIRED)\tCharater(s) that divides the password attribute\n\t\t\t\t\t\tin realm and password tokens, default ':' realm:password\n"); |
There was a problem hiding this comment.
"Charater" also need a fix. Maybe manual later due to the \t issues.
There was a problem hiding this comment.
Yes. This is related to the \t issue.
Codespell is comparing the word "tcharater" against its default dictionary.
The \t and \n issue should be patched in codespell itself.
Maybe it is already being addressed?
|
OK to test |
|
@mrumph, just to clarify the scope here: This PR is about applying the official spell-check.sh script and nothing else. Consequently,
|
|
So the comments show two types of problems:
The first case is to be expected and is outside the scope of this PR and PR #565. For case number 2, I can add some items to the white list. |
|
So the only thing that I am seeing to change at this time is to reverse the "whats" to "what's" change. |
I think so, but I am also OK with making it here if that is your strong preference. I know that creating a dedicated PR for a one-line whitelist change does not really make sense on the surface. For the master branch code, it does not really matter -- the end result will be the same. However, there may be a difference in other contexts:
None of the above problems are major, all have workarounds, and a separate PR does add quite a bit of an overhead for you. Thus, I do not insist on a separate PR for the whitelist change in this context. And yes, future code-changing PRs may include whitelist changes. In those sitiations, a separate PR would definitely be an overkill. |
Reverted change from "Whats" to "What's" to prevent Doxygen breakage. Added "whats" to the white list. Changes to be committed: modified: scripts/codespell-whitelist.txt modified: src/clientStream.h
No description provided.