rob05c commented on code in PR #6892:
URL: https://github.com/apache/trafficcontrol/pull/6892#discussion_r894559251
##########
lib/go-atscfg/storagedotconfig_test.go:
##########
@@ -112,7 +112,7 @@ func TestMakeStorageDotConfigNoParams(t *testing.T) {
testComment(t, txt, hdr)
- if count := strings.Count(txt, "\n"); count != 2 { // comment plus a
blank line
+ if count := strings.Count(txt, "\n"); count != 3 { // comment header
plus its blank plus a blank line
t.Errorf("expected one line for comment, plus one blank line
(it's important to send a blank line, to prevent many callers from returning a
404), actual: '"+txt+"' count %v", count)
Review Comment:
I don't think we typically require code comments to be complete sentences or
proper English, outside those generating documentation like GoDoc.
I think the sentence you're suggesting also loses data, the fact that one of
the blanks is associated with the comment header, and the other is unrelated,
is relevant and useful information.
We could make the last clause "plus an additional, unrelated blank line."
But I feel like the verbosity would make the code less readable in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]