git » chasquid » commit 5cdbd9f

Fix documentation/comment typos

author Alberto Bertogli
2023-10-07 11:40:59 UTC
committer Alberto Bertogli
2023-10-07 11:41:57 UTC
parent 43e98e08a82225d9807d4650df85ea73d640a7da

Fix documentation/comment typos

This patch fixes a variety of typos in documentation and comments, found
by running `codespell`.

cmd/dovecot-auth-cli/test_auth_bad_proto.cmy +1 -1
docs/aliases.md +1 -1
docs/hooks.md +1 -1
internal/aliases/aliases.go +1 -1
internal/domaininfo/domaininfo_test.go +1 -1
internal/dovecot/dovecot.go +1 -1
internal/expvarom/expvarom.go +1 -1
internal/localrpc/localrpc.go +1 -1
internal/nettrace/trace.go +1 -1
internal/smtpsrv/conn.go +1 -1
internal/sts/sts_test.go +1 -1
test/t-01-simple_local/run.sh +1 -1
test/t-11-dovecot/run.sh +2 -2
test/t-19-dkimpy/config/hooks/post-data +1 -1
test/t-19-dkimpy/run.sh +1 -1

diff --git a/cmd/dovecot-auth-cli/test_auth_bad_proto.cmy b/cmd/dovecot-auth-cli/test_auth_bad_proto.cmy
index cc3b572..2869142 100644
--- a/cmd/dovecot-auth-cli/test_auth_bad_proto.cmy
+++ b/cmd/dovecot-auth-cli/test_auth_bad_proto.cmy
@@ -1,5 +1,5 @@
 
-# Break the handhake early.
+# Break the handshake early.
 client unix_listen .dovecot-client
 c = ./dovecot-auth-cli .dovecot auth username password
 
diff --git a/docs/aliases.md b/docs/aliases.md
index efef317..d3ba0c8 100644
--- a/docs/aliases.md
+++ b/docs/aliases.md
@@ -32,7 +32,7 @@ For example:
 # Redirect mail to pepe@ to jose@ on the same domain.
 pepe: jose
 
-# Redirect mail to flowers@ to the indvidual flowers.
+# Redirect mail to flowers@ to the individual flowers.
 flowers: rose@backgarden, lilly@pond
 ```
 
diff --git a/docs/hooks.md b/docs/hooks.md
index 14300e2..97fb127 100644
--- a/docs/hooks.md
+++ b/docs/hooks.md
@@ -68,7 +68,7 @@ The output of the command will be parsed as if it was the right-hand side of
 the aliases configuration file (see [Aliases](aliases.md) for more details).
 Results are appended to the results of the file-based alias resolution.
 
-If there is no alias for the address, the hook should just exit successfuly
+If there is no alias for the address, the hook should just exit successfully
 without emitting any output.
 
 There is a 5 second timeout for hook execution. If the hook exits with an
diff --git a/internal/aliases/aliases.go b/internal/aliases/aliases.go
index 37211be..1a593bb 100644
--- a/internal/aliases/aliases.go
+++ b/internal/aliases/aliases.go
@@ -86,7 +86,7 @@ type Recipient struct {
 	Type RType
 }
 
-// RType represents a recipient type, see the contants below for valid values.
+// RType represents a recipient type, see the constants below for valid values.
 type RType string
 
 // Valid recipient types.
diff --git a/internal/domaininfo/domaininfo_test.go b/internal/domaininfo/domaininfo_test.go
index 77121a6..7ace0e5 100644
--- a/internal/domaininfo/domaininfo_test.go
+++ b/internal/domaininfo/domaininfo_test.go
@@ -90,7 +90,7 @@ func TestNewDomain(t *testing.T) {
 	for _, c := range cases {
 		// The other tests do an incoming check first, so new domains would get
 		// created via that path. We switch the order here to exercise that
-		// OutgoingSecLevel also handles new domains successfuly.
+		// OutgoingSecLevel also handles new domains successfully.
 		if !db.OutgoingSecLevel(tr, c.domain, c.level) {
 			t.Errorf("domain %q not allowed (out) at %s", c.domain, c.level)
 		}
diff --git a/internal/dovecot/dovecot.go b/internal/dovecot/dovecot.go
index bb4836d..711cd23 100644
--- a/internal/dovecot/dovecot.go
+++ b/internal/dovecot/dovecot.go
@@ -239,7 +239,7 @@ func write(conn *textproto.Conn, msg string) error {
 }
 
 // isUsernameSafe to use in the dovecot protocol?
-// Unfotunately dovecot's protocol is not very robust wrt. whitespace,
+// Unfortunately dovecot's protocol is not very robust wrt. whitespace,
 // so we need to be careful.
 func isUsernameSafe(user string) bool {
 	for _, r := range user {
diff --git a/internal/expvarom/expvarom.go b/internal/expvarom/expvarom.go
index 3457557..12f9ce2 100644
--- a/internal/expvarom/expvarom.go
+++ b/internal/expvarom/expvarom.go
@@ -19,7 +19,7 @@
 // and it is possible that it will change in the future.
 //
 // Backwards compatibility is NOT guaranteed, until the format is fully
-// standarized.
+// standardized.
 package expvarom
 
 import (
diff --git a/internal/localrpc/localrpc.go b/internal/localrpc/localrpc.go
index 68e8ec7..f5b99c7 100644
--- a/internal/localrpc/localrpc.go
+++ b/internal/localrpc/localrpc.go
@@ -2,7 +2,7 @@
 //
 // This is a simple RPC package that uses a line-oriented protocol for
 // encoding and decoding, and Unix sockets for transport. It is meant to be
-// used for lightweight occassional communication between processes on the
+// used for lightweight occasional communication between processes on the
 // same machine.
 package localrpc
 
diff --git a/internal/nettrace/trace.go b/internal/nettrace/trace.go
index 7013e48..700d6ff 100644
--- a/internal/nettrace/trace.go
+++ b/internal/nettrace/trace.go
@@ -301,7 +301,7 @@ func (tr *trace) IsError() bool {
 // We keep this many buckets of finished traces.
 const nBuckets = 8
 
-// Buckets to use. Lenght must match nBuckets.
+// Buckets to use. Length must match nBuckets.
 // "Traces with a latency >= $duration".
 var buckets = []time.Duration{
 	time.Duration(0),
diff --git a/internal/smtpsrv/conn.go b/internal/smtpsrv/conn.go
index a69f025..d0a0c31 100644
--- a/internal/smtpsrv/conn.go
+++ b/internal/smtpsrv/conn.go
@@ -845,7 +845,7 @@ func (c *Conn) runPostDataHook(data []byte) ([]byte, bool, error) {
 	cmd.Stdin = bytes.NewReader(data)
 
 	// Prepare the environment, copying some common variables so the hook has
-	// someting reasonable, and then setting the specific ones for this case.
+	// something reasonable, and then setting the specific ones for this case.
 	for _, v := range strings.Fields("USER PWD SHELL PATH") {
 		cmd.Env = append(cmd.Env, v+"="+os.Getenv(v))
 	}
diff --git a/internal/sts/sts_test.go b/internal/sts/sts_test.go
index 7ff4570..6f8dc34 100644
--- a/internal/sts/sts_test.go
+++ b/internal/sts/sts_test.go
@@ -550,7 +550,7 @@ func TestHTTPGet(t *testing.T) {
 		t.Errorf("content type != text/plain was allowed: got %q, %v", raw, err)
 	}
 
-	// Invalid (unparseable) media type.
+	// Invalid (unparsable) media type.
 	srv4 := httptest.NewServer(
 		http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 			w.Header().Set("Content-Type", "invalid/content/type")
diff --git a/test/t-01-simple_local/run.sh b/test/t-01-simple_local/run.sh
index 2854b45..000f339 100755
--- a/test/t-01-simple_local/run.sh
+++ b/test/t-01-simple_local/run.sh
@@ -37,7 +37,7 @@ if ! run_msmtp -a subm_tls someone@testserver < content 2> /dev/null; then
 fi
 
 if run_msmtp nobody@testserver < content 2> /dev/null; then
-	fail "successfuly sent an email to a non-existent user"
+	fail "successfully sent an email to a non-existent user"
 fi
 
 if run_msmtp -a baduser someone@testserver < content 2> /dev/null; then
diff --git a/test/t-11-dovecot/run.sh b/test/t-11-dovecot/run.sh
index 22de6d9..51fbeb8 100755
--- a/test/t-11-dovecot/run.sh
+++ b/test/t-11-dovecot/run.sh
@@ -18,7 +18,7 @@ fi
 
 # Create a temporary directory for dovecot to use, and generate the dovecot
 # config based on the template.
-# Note the lenght of the path must be < 100, because unix sockets have a low
+# Note the length of the path must be < 100, because unix sockets have a low
 # limitation, so we use a directory in /tmp, which is not ideal, as a
 # workaround.
 export ROOT="/tmp/chasquid-dovecot-test"
@@ -69,7 +69,7 @@ mail_diff content .mail/naked@srv
 
 # Fail to send to nobody@srv (user does not exist).
 if run_msmtp nobody@srv < content 2> /dev/null; then
-	fail "successfuly sent an email to a non-existent user"
+	fail "successfully sent an email to a non-existent user"
 fi
 
 # Fail to send from baduser@srv (user does not exist).
diff --git a/test/t-19-dkimpy/config/hooks/post-data b/test/t-19-dkimpy/config/hooks/post-data
index 2fb9f99..7304022 100755
--- a/test/t-19-dkimpy/config/hooks/post-data
+++ b/test/t-19-dkimpy/config/hooks/post-data
@@ -37,7 +37,7 @@ if [ "$AUTH_AS" != "" ]; then
 	rm "$TF.dkimout"
 else
 	# NOTE: This is using driusan/dkim instead of dkimpy, because dkimpy can't be
-	# overriden to get the DNS information from anywhere else (text file or custom
+	# overridden to get the DNS information from anywhere else (text file or custom
 	# DNS server).
 	dkimverify -txt ../.dkimcerts/private.dns < "$TF"
 fi
diff --git a/test/t-19-dkimpy/run.sh b/test/t-19-dkimpy/run.sh
index e79ffa5..937d2a2 100755
--- a/test/t-19-dkimpy/run.sh
+++ b/test/t-19-dkimpy/run.sh
@@ -56,7 +56,7 @@ fi
 
 # Verify the signature manually, just in case.
 # NOTE: This is using driusan/dkim instead of dkimpy, because dkimpy can't be
-# overriden to get the DNS information from anywhere else (text file or custom
+# overridden to get the DNS information from anywhere else (text file or custom
 # DNS server).
 dkimverify -txt .dkimcerts/private.dns < .mail/someone@testserver