Typos in the code and README

Started by Daniel Gustafssonalmost 2 years ago51 messages
Jump to latest
#1Daniel Gustafsson
daniel@yesql.se

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments and
one in code. The attached fixes all that I came across (not cross-referenced
against ongoing reverts or any other fixup threads but will be before pushing
of course).

--
Daniel Gustafsson

Attachments:

v1-0001-Fix-typos.patchapplication/octet-stream; name=v1-0001-Fix-typos.patch; x-unix-mode=0644Download+42-32
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Daniel Gustafsson (#1)
Re: Typos in the code and README

On 2024-04-11 Th 09:05, Daniel Gustafsson wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments and
one in code. The attached fixes all that I came across (not cross-referenced
against ongoing reverts or any other fixup threads but will be before pushing
of course).

I have these covered:

src/test/modules/test_json_parser/README                  | 2 +-
.../test_json_parser/test_json_parser_incremental.c       | 4 ++--
src/test/modules/test_json_parser/test_json_parser_perf.c | 2 +-

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

#3David Rowley
dgrowleyml@gmail.com
In reply to: Daniel Gustafsson (#1)
Re: Typos in the code and README

On Fri, 12 Apr 2024, 1:05 am Daniel Gustafsson, <daniel@yesql.se> wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments
and
one in code. The attached fixes all that I came across (not
cross-referenced
against ongoing reverts or any other fixup threads but will be before
pushing
of course).

I see you've corrected "iif" to "if". It should be "iff".

David

Show quoted text
#4Daniel Gustafsson
daniel@yesql.se
In reply to: David Rowley (#3)
Re: Typos in the code and README

On 11 Apr 2024, at 15:29, David Rowley <dgrowleyml@gmail.com> wrote:

On Fri, 12 Apr 2024, 1:05 am Daniel Gustafsson, <daniel@yesql.se <mailto:daniel@yesql.se>> wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments and
one in code. The attached fixes all that I came across (not cross-referenced
against ongoing reverts or any other fixup threads but will be before pushing
of course).

I see you've corrected "iif" to "if". It should be "iff".

Gotcha, will fix. I opted for "if" due to recent threads where the use of
"iff" was discouraged due to not being commonly known, but that was in doc/ and
not code comments.

--
Daniel Gustafsson

#5Bruce Momjian
bruce@momjian.us
In reply to: Daniel Gustafsson (#4)
Re: Typos in the code and README

On Thu, Apr 11, 2024 at 03:37:00PM +0200, Daniel Gustafsson wrote:

On 11 Apr 2024, at 15:29, David Rowley <dgrowleyml@gmail.com> wrote:

On Fri, 12 Apr 2024, 1:05 am Daniel Gustafsson, <daniel@yesql.se> wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling
to
check spelling. I was primarily interested in docs and README* which
were
mostly free from simply typos, while the code had some in various
comments and
one in code. The attached fixes all that I came across (not
cross-referenced
against ongoing reverts or any other fixup threads but will be before
pushing
of course).

I see you've corrected "iif" to "if". It should be "iff".

Gotcha, will fix. I opted for "if" due to recent threads where the use of
"iff" was discouraged due to not being commonly known, but that was in doc/ and
not code comments.

I actually agree "iff" is just not clear enough. "Iff" stands for "if
and only if" and maybe should be spelled out that way.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#6Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#5)
Re: Typos in the code and README

On Fri, Apr 12, 2024 at 04:55:16PM -0400, Bruce Momjian wrote:

On Thu, Apr 11, 2024 at 03:37:00PM +0200, Daniel Gustafsson wrote:

On 11 Apr 2024, at 15:29, David Rowley <dgrowleyml@gmail.com> wrote:

On Fri, 12 Apr 2024, 1:05 am Daniel Gustafsson, <daniel@yesql.se> wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling
to
check spelling. I was primarily interested in docs and README* which
were
mostly free from simply typos, while the code had some in various
comments and
one in code. The attached fixes all that I came across (not
cross-referenced
against ongoing reverts or any other fixup threads but will be before
pushing
of course).

I see you've corrected "iif" to "if". It should be "iff".

Gotcha, will fix. I opted for "if" due to recent threads where the use of
"iff" was discouraged due to not being commonly known, but that was in doc/ and
not code comments.

I actually agree "iff" is just not clear enough. "Iff" stands for "if
and only if" and maybe should be spelled out that way.

Just to clarify, I think "if and only if" means "if A then B" and B can
only happen if A happens, meaning there are not other cases where B can
happen. This latter part is what disinguishes "iff" from "if".

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#7Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Daniel Gustafsson (#1)
Re: Typos in the code and README

On 11/04/2024 16:05, Daniel Gustafsson wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments and
one in code. The attached fixes all that I came across (not cross-referenced
against ongoing reverts or any other fixup threads but will be before pushing
of course).

Here's a few more. I've accumulate these over the past couple of months,
keeping them stashed in a branch, adding to it whenever I've spotted a
minor typo while reading the code.

--
Heikki Linnakangas
Neon (https://neon.tech)

Attachments:

0001-fix-typos.patchtext/x-patch; charset=UTF-8; name=0001-fix-typos.patchDownload+22-21
0002-fix-func-name.patchtext/x-patch; charset=UTF-8; name=0002-fix-func-name.patchDownload+1-2
#8Daniel Gustafsson
daniel@yesql.se
In reply to: Heikki Linnakangas (#7)
Re: Typos in the code and README

On 12 Apr 2024, at 23:15, Heikki Linnakangas <hlinnaka@iki.fi> wrote:

On 11/04/2024 16:05, Daniel Gustafsson wrote:

Now that the tree has settled down a bit post-freeze I ran some tooling to
check spelling. I was primarily interested in docs and README* which were
mostly free from simply typos, while the code had some in various comments and
one in code. The attached fixes all that I came across (not cross-referenced
against ongoing reverts or any other fixup threads but will be before pushing
of course).

Here's a few more. I've accumulate these over the past couple of months, keeping them stashed in a branch, adding to it whenever I've spotted a minor typo while reading the code.

Nice, let's lot all these together.

--
Daniel Gustafsson

#9David Rowley
dgrowleyml@gmail.com
In reply to: Daniel Gustafsson (#8)
Re: Typos in the code and README

On Sat, 13 Apr 2024 at 09:17, Daniel Gustafsson <daniel@yesql.se> wrote:

On 12 Apr 2024, at 23:15, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Here's a few more. I've accumulate these over the past couple of months, keeping them stashed in a branch, adding to it whenever I've spotted a minor typo while reading the code.

Nice, let's lot all these together.

Here are a few additional ones to add to that.

Found with a manual trawl through git grep -E
'\b([a-zA-Z]{2,}[^long|^that])\s+\1\b' -- ':!*.po' ':!*.dat'

David

Attachments:

dedup_words.patchtext/plain; charset=US-ASCII; name=dedup_words.patchDownload+19-15
#10Daniel Gustafsson
daniel@yesql.se
In reply to: David Rowley (#9)
Re: Typos in the code and README

On 14 Apr 2024, at 13:19, David Rowley <dgrowleyml@gmail.com> wrote:

On Sat, 13 Apr 2024 at 09:17, Daniel Gustafsson <daniel@yesql.se> wrote:

On 12 Apr 2024, at 23:15, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Here's a few more. I've accumulate these over the past couple of months, keeping them stashed in a branch, adding to it whenever I've spotted a minor typo while reading the code.

Nice, let's lot all these together.

Here are a few additional ones to add to that.

Thanks. Collecting all the ones submitted here, as well as a few submitted
off-list by Alexander, the patch is now a 3-part patchset of cleanups:

0001 contains the typos and duplicate words fixups, 0002 fixes a parameter with
the wrong name in the prototype and 0003 removes a leftover prototype which was
accidentally left in a refactoring.

--
Daniel Gustafsson

Attachments:

v2-0003-Remove-unused-function-prototype.patchapplication/octet-stream; name=v2-0003-Remove-unused-function-prototype.patch; x-unix-mode=0644Download+0-2
v2-0002-Fix-incorrect-parameter-name-in-prototype.patchapplication/octet-stream; name=v2-0002-Fix-incorrect-parameter-name-in-prototype.patch; x-unix-mode=0644Download+1-2
v2-0001-Fix-typos-and-duplicate-words-in-comments.patchapplication/octet-stream; name=v2-0001-Fix-typos-and-duplicate-words-in-comments.patch; x-unix-mode=0644Download+98-81
#11Richard Guo
guofenglinux@gmail.com
In reply to: Daniel Gustafsson (#10)
Re: Typos in the code and README

On Mon, Apr 15, 2024 at 8:26 PM Daniel Gustafsson <daniel@yesql.se> wrote:

Thanks. Collecting all the ones submitted here, as well as a few submitted
off-list by Alexander, the patch is now a 3-part patchset of cleanups:

0001 contains the typos and duplicate words fixups, 0002 fixes a parameter
with
the wrong name in the prototype and 0003 removes a leftover prototype
which was
accidentally left in a refactoring.

BTW, it seems that 0001 needs a rebase over 9dfcac8e15.

Thanks
Richard

#12Nazir Bilal Yavuz
byavuz81@gmail.com
In reply to: Daniel Gustafsson (#10)
Re: Typos in the code and README

Hi,

Thanks for working on this!

On Mon, 15 Apr 2024 at 15:26, Daniel Gustafsson <daniel@yesql.se> wrote:

On 14 Apr 2024, at 13:19, David Rowley <dgrowleyml@gmail.com> wrote:

On Sat, 13 Apr 2024 at 09:17, Daniel Gustafsson <daniel@yesql.se> wrote:

On 12 Apr 2024, at 23:15, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Here's a few more. I've accumulate these over the past couple of months, keeping them stashed in a branch, adding to it whenever I've spotted a minor typo while reading the code.

Nice, let's lot all these together.

Here are a few additional ones to add to that.

Thanks. Collecting all the ones submitted here, as well as a few submitted
off-list by Alexander, the patch is now a 3-part patchset of cleanups:

0001 contains the typos and duplicate words fixups, 0002 fixes a parameter with
the wrong name in the prototype and 0003 removes a leftover prototype which was
accidentally left in a refactoring.

I realized two small typos: 'sgmr' -> 'smgr'. You may want to include
them in 0001.

--
Regards,
Nazir Bilal Yavuz
Microsoft

#13Daniel Gustafsson
daniel@yesql.se
In reply to: Nazir Bilal Yavuz (#12)
Re: Typos in the code and README

On 16 Apr 2024, at 15:37, Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:

I realized two small typos: 'sgmr' -> 'smgr'. You may want to include
them in 0001.

Thanks, I incorporated these into 0001 before pushing. All the commits in this
patchset are now applied.

--
Daniel Gustafsson

#14David Rowley
dgrowleyml@gmail.com
In reply to: Daniel Gustafsson (#13)
Re: Typos in the code and README

On Fri, 19 Apr 2024 at 20:13, Daniel Gustafsson <daniel@yesql.se> wrote:

Thanks, I incorporated these into 0001 before pushing. All the commits in this
patchset are now applied.

Here are a few more to see if it motivates anyone else to do a more
thorough search for another batch.

Fixes duplicate words spanning multiple lines plus an outdated
reference to "streaming read" which was renamed to "read stream" late
in that patch's development.

duplicate words found using:
ag "\s([a-zA-Z]{2,})[\s*]*\n\1\b"
ag "\s([a-zA-Z]{2,})\n(\s*\*\s*)\1\b"

David

Attachments:

assortment_of_typo_fixes.patchtext/plain; charset=US-ASCII; name=assortment_of_typo_fixes.patchDownload+5-5
#15David Rowley
dgrowleyml@gmail.com
In reply to: David Rowley (#14)
Re: Typos in the code and README

On Sat, 20 Apr 2024 at 16:09, David Rowley <dgrowleyml@gmail.com> wrote:

Here are a few more to see if it motivates anyone else to do a more
thorough search for another batch.

I've pushed these now.

David

#16Alexander Lakhin
exclusion@gmail.com
In reply to: David Rowley (#15)
Re: Typos in the code and README

Hello,

28.04.2024 11:05, David Rowley wrote:

On Sat, 20 Apr 2024 at 16:09, David Rowley <dgrowleyml@gmail.com> wrote:

Here are a few more to see if it motivates anyone else to do a more
thorough search for another batch.

I've pushed these now.

Please look also at the list of other typos and inconsistencies I've found
on the master branch:
additional_notnulls -> old_notnulls (cf. b0e96f311)
ATAddCheckConstraint ->? ATAddCheckNNConstraint (cf. b0e96f311)
bt_page_check -> bt_target_page_check (cf. 5ae208720)
calblack_arg -> callback_arg
combinig -> combining
compaining -> complaining
ctllock - remove (cf. 53c2a97a9)
dabatase -> database
eval_const_exprs_mutator -> eval_const_expressions_mutator
ExecEndValuesScan - remove (cf. d060e921e)
get_json_nested_columns -> get_json_table_nested_columns
io_direct -> debug_io_direct
iS ->? IS (a neatnik-ism)
joing ->? join (cf. 20f90a0e4)
_jumbleRangeTblEntry - remove (cf. 367c989cd)
Mallroy -> Mallory
onstead -> instead
procedual -> procedural
psql_safe -> safe_psql
read_quoted_pattern -> read_quoted_string
repertiore -> repertoire
rightfirstdataoffset ->? rightfirstoffset (cf. 5ae208720)
Sincle ->? Since (perhaps the whole sentence could be rephrased)
sslnegotition=direct/requiredirectwould -> sslnegotiation=direct/requiredirect would
sslnegotitation -> sslnegotiation
walreciever -> walreceiver
xid_wrapround -> xid_wraparound

(some of them are located in doc/, so it's not a code-only change)
I've attached the patch for your convenience, though maybe some
of the suggestions are to be discarded.

Best regards,
Alexander

Attachments:

fix-v17-typos.patchtext/x-patch; charset=UTF-8; name=fix-v17-typos.patchDownload+24-27
#17David Rowley
dgrowleyml@gmail.com
In reply to: Alexander Lakhin (#16)
Re: Typos in the code and README

On Fri, 3 May 2024 at 00:00, Alexander Lakhin <exclusion@gmail.com> wrote:

(some of them are located in doc/, so it's not a code-only change)
I've attached the patch for your convenience, though maybe some
of the suggestions are to be discarded.

Thanks. I was hoping you'd do that.

I pushed the patch after only adjusting the path in the docs which had
"module" rather than "modules".

David

#18Alexander Lakhin
exclusion@gmail.com
In reply to: David Rowley (#17)
Re: Typos in the code and README

Hello hackers,

03.05.2024 17:36, David Rowley wrote:

I pushed the patch after only adjusting the path in the docs which had
"module" rather than "modules".

Please look at another bunch of inconsistencies/orphaned entities I found
in the tree, with the possible substitutions:
errmsg_buf -> errormsg_buf
(coined by 6b18b3fe2)

NoMovementScanDirectionScans -> NoMovementScanDirection
(introduced with e9aaf0632, discussed in [1]/messages/by-id/20230131140224.7j6gbcsfwmad2a4b@liskov, but still seems inaccurate)

XLogReadRecordInternal -> XLogReadRecord
(from 3f1ce9734, align with a comment above: "Start and end point of last
record returned by XLogReadRecord().")

BYPASS_ALLOWCONN -> BGWORKER_BYPASS_ROLELOGINCHECK (see 492217301)

xs_ctup.t_self -> xs_heaptid (see c2fe139c2 and 304532421)

pgStatShmLookupCache -> pgStatLocal.shmem (coined by 5891c7a8e)

smgr_fsm_nblocks and smgr_vm_nblocks -> smgr_cached_nblocks
(see the same comment updated by c5315f4f4)

XID becomes older than GlobalXmin -> XID becomes visible to everyone
(in accordance with dc7420c2c9 src/backend/access/gist/gistutil.c)

gen-rtab - remove (non-existing since db7d1a7b0)

BARRIER_SHOULD_CHECK - remove (unused since a3ed4d1ef)

EXE_EXT - remove (unused since f06b1c598)

endterm - remove
(see 60c90c16c -- Use xreflabel attributes instead of endterm ...)

xl_commit_ts_set, SizeOfCommitTsSet - remove (unused since 08aa89b32)

The corresponding patch is attached for your convenience.

[1]: /messages/by-id/20230131140224.7j6gbcsfwmad2a4b@liskov

Best regards,
Alexander

Attachments:

fix-inconsistencies.patchtext/x-patch; charset=UTF-8; name=fix-inconsistencies.patchDownload+13-34
#19Daniel Gustafsson
daniel@yesql.se
In reply to: Alexander Lakhin (#18)
Re: Typos in the code and README

On 4 Jul 2024, at 19:00, Alexander Lakhin <exclusion@gmail.com> wrote:

Please look at another bunch of inconsistencies/orphaned entities I found
in the tree, with the possible substitutions:

Thanks for these, and sorry for the delay in processing them (summer happened
etc). I've started to go through them and have applied some low-hanging fruit
already, will go over all them.

--
Daniel Gustafsson

#20David Rowley
dgrowleyml@gmail.com
In reply to: Alexander Lakhin (#18)
Re: Typos in the code and README

(I know Daniel mentioned he'd get to these, but the ScanDirection one
was my fault and I needed to clear that off my mind. I did a few
others while on this topic.)

On Fri, 5 Jul 2024 at 05:00, Alexander Lakhin <exclusion@gmail.com> wrote:

Please look at another bunch of inconsistencies/orphaned entities I found
in the tree, with the possible substitutions:
errmsg_buf -> errormsg_buf
(coined by 6b18b3fe2)

Fixed.

NoMovementScanDirectionScans -> NoMovementScanDirection
(introduced with e9aaf0632, discussed in [1], but still seems inaccurate)

Oops. Fixed.

XLogReadRecordInternal -> XLogReadRecord
(from 3f1ce9734, align with a comment above: "Start and end point of last
record returned by XLogReadRecord().")

Fixed.

BYPASS_ALLOWCONN -> BGWORKER_BYPASS_ROLELOGINCHECK (see 492217301)

Fixed

xs_ctup.t_self -> xs_heaptid (see c2fe139c2 and 304532421)

Fixed.

pgStatShmLookupCache -> pgStatLocal.shmem (coined by 5891c7a8e)

Fixed.

smgr_fsm_nblocks and smgr_vm_nblocks -> smgr_cached_nblocks
(see the same comment updated by c5315f4f4)

Heikki fixed in 19de089cd.

XID becomes older than GlobalXmin -> XID becomes visible to everyone
(in accordance with dc7420c2c9 src/backend/access/gist/gistutil.c)

I'd need to spend more time to understand this.

gen-rtab - remove (non-existing since db7d1a7b0)

Daniel fixed in cc59f9d0f.

BARRIER_SHOULD_CHECK - remove (unused since a3ed4d1ef)

I wasn't sure if nothing else external could be using this. The macro
doesn't use any fields that are now gone, so I'm not confident enough
to remove it. Can Robert confirm?

EXE_EXT - remove (unused since f06b1c598)

Daniel fixed in 88e3da565.

endterm - remove
(see 60c90c16c -- Use xreflabel attributes instead of endterm ...)

I read that commit message and I agree it's now unused. I just didn't
get any vibes from the commit message that it shouldn't ever be used
again. Can Tom confirm?

xl_commit_ts_set, SizeOfCommitTsSet - remove (unused since 08aa89b32)

I would say it should be removed. I just didn't because the commit I
had pending fitted into the "typos" category and this didn't quite
fit.

I've attached a patch with the remainder.

David

Attachments:

remaining_typos.patchapplication/octet-stream; name=remaining_typos.patchDownload+1-20
#21Alexander Lakhin
exclusion@gmail.com
In reply to: David Rowley (#20)
#22Michael Paquier
michael@paquier.xyz
In reply to: Alexander Lakhin (#21)
#23Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#22)
#24Daniel Gustafsson
daniel@yesql.se
In reply to: Michael Paquier (#23)
#25Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#24)
#26Daniel Gustafsson
daniel@yesql.se
In reply to: Michael Paquier (#25)
#27David Rowley
dgrowleyml@gmail.com
In reply to: Daniel Gustafsson (#26)
#28Michael Paquier
michael@paquier.xyz
In reply to: David Rowley (#27)
#29Daniel Gustafsson
daniel@yesql.se
In reply to: David Rowley (#27)
#30Alexander Lakhin
exclusion@gmail.com
In reply to: Michael Paquier (#23)
#31David Rowley
dgrowleyml@gmail.com
In reply to: Alexander Lakhin (#30)
#32Alexander Lakhin
exclusion@gmail.com
In reply to: David Rowley (#31)
#33Michael Paquier
michael@paquier.xyz
In reply to: Alexander Lakhin (#32)
#34Alexander Lakhin
exclusion@gmail.com
In reply to: Michael Paquier (#33)
#35David Rowley
dgrowleyml@gmail.com
In reply to: Alexander Lakhin (#32)
#36David Rowley
dgrowleyml@gmail.com
In reply to: David Rowley (#35)
#37Michael Paquier
michael@paquier.xyz
In reply to: David Rowley (#36)
#38David Rowley
dgrowleyml@gmail.com
In reply to: Michael Paquier (#37)
#39Alexander Lakhin
exclusion@gmail.com
In reply to: David Rowley (#38)
#40Michael Paquier
michael@paquier.xyz
In reply to: Alexander Lakhin (#39)
#41Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#40)
#42Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#41)
#43Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#42)
#44Andres Freund
andres@anarazel.de
In reply to: Alexander Lakhin (#39)
#45Alexander Lakhin
exclusion@gmail.com
In reply to: Andres Freund (#44)
#46Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#41)
#47Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#46)
#48Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#47)
#49Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#48)
#50Michael Paquier
michael@paquier.xyz
In reply to: Alexander Lakhin (#45)
#51Andres Freund
andres@anarazel.de
In reply to: Michael Paquier (#50)